File size: 686 Bytes
eafc074
3ad131b
eafc074
 
 
 
 
3ad131b
 
eafc074
3ad131b
09dfa66
eafc074
3ad131b
 
eafc074
 
 
3ad131b
 
eafc074
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.10-slim

# Set environment variables
ENV HOME /app
ENV PATH="/usr/local/bin:$PATH"

# Create and set working directory
WORKDIR /app

# Copy requirement files
COPY requirements.txt .

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

# Copy application files (app.py and model weights)
# IMPORTANT: All your model files (config.json, model.safetensors, etc.)
# MUST be uploaded to the root of your Hugging Face repo alongside this Dockerfile.
COPY . .

# Set the command to run the FastAPI application
# This is the standard, reliable entry point for FastAPI on Hugging Face Spaces.
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]