DrValera commited on
Commit
56532ca
·
verified ·
1 Parent(s): 5f4444a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile (public proxy)
2
+ FROM python:3.11-slim
3
+
4
+ WORKDIR /app
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Install Python deps
9
+ COPY requirements.txt .
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Copy code
13
+ COPY main.py .
14
+
15
+ # Hugging Face expects the app to listen on port 7860
16
+ ENV PORT=7860
17
+ EXPOSE 7860
18
+
19
+ # Launch FastAPI
20
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]