Seth0330 commited on
Commit
188a0d4
·
verified ·
1 Parent(s): 789e202

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a slim Python image
2
+ FROM python:3.10-slim
3
+
4
+ # System deps (optional but good for SSL/fonts)
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ curl ca-certificates && rm -rf /var/lib/apt/lists/*
7
+
8
+ # Workdir
9
+ WORKDIR /app
10
+
11
+ # Install Python deps
12
+ COPY requirements.txt /app/requirements.txt
13
+ RUN pip install --no-cache-dir -U pip && \
14
+ pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy app code
17
+ COPY . /app
18
+
19
+ # Hugging Face expects the app to listen on 7860
20
+ ENV PORT=7860
21
+ EXPOSE 7860
22
+
23
+ # Launch FastAPI
24
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]