File size: 525 Bytes
df42fba
0c25324
df42fba
0c25324
df42fba
 
 
b9eda33
df42fba
 
6727df4
df42fba
 
 
884baf5
df42fba
 
884baf5
df42fba
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.10-slim

WORKDIR /app

# Set Hugging Face cache
ENV HF_HOME=/app/hf_cache
RUN mkdir -p /app/hf_cache && chmod -R 777 /app/hf_cache

# Install Git and cleanup
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*

# Install Python packages
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt

# Copy code
COPY main.py .

# ✅ Run with main.py, and port 7860 (required by Hugging Face)
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]