ztoolx commited on
Commit
adfb434
·
verified ·
1 Parent(s): e573d34
Files changed (1) hide show
  1. DockerFile +20 -0
DockerFile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ### 2. `Dockerfile`
3
+ *(This tells Hugging Face how to build the Python environment)*
4
+ ```dockerfile
5
+ FROM python:3.9-slim
6
+
7
+ WORKDIR /app
8
+
9
+ # Install dependencies
10
+ COPY requirements.txt .
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Copy application code
14
+ COPY main.py .
15
+
16
+ # Expose the port FastAPI runs on
17
+ EXPOSE 7860
18
+
19
+ # Run the app
20
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]