File size: 480 Bytes
f7cecf3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Use a lightweight Python x86 image
FROM python:3.10-slim

# Set the working directory inside the server
WORKDIR /app

# Copy your requirements first and install them
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy all your Python code, CSVs, and logic into the server
COPY . .

# Hugging Face REQUIRES your app to run on port 7860
EXPOSE 7860

# The command to boot the server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]