zypernike commited on
Commit
5796525
·
verified ·
1 Parent(s): 0567de0

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Prevent Python from buffering stdout/stderr
4
+ ENV PYTHONUNBUFFERED=1
5
+
6
+ WORKDIR /app
7
+
8
+ # Install dependencies
9
+ COPY requirements.txt .
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Copy application
13
+ COPY app.py .
14
+
15
+ # Hugging Face uses port 7860
16
+ EXPOSE 7860
17
+
18
+ # Run FastAPI
19
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]