File size: 510 Bytes
8ba0064
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Use a lightweight Python version
FROM python:3.9-slim

# Set the working directory inside the container
WORKDIR /app

# Copy the requirements file first to cache dependencies
COPY requirements.txt .

# Install Python libraries
RUN pip install --no-cache-dir -r requirements.txt

# Copy the application code and artifacts folder
COPY . .

# Expose the port required by Hugging Face
EXPOSE 7860

# Command to start the server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]