anujakkulkarni commited on
Commit
c26d983
·
verified ·
1 Parent(s): 57779e5

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1
4
+ ENV PYTHONUNBUFFERED=1
5
+ ENV PORT=7860
6
+
7
+ # System deps (optional, slim base generally fine)
8
+ RUN apt-get update && apt-get install -y --no-install-recommends \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ WORKDIR /app
12
+
13
+ COPY requirements.txt /app/
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ COPY app.py /app/
17
+
18
+ EXPOSE 7860
19
+ # Uvicorn must bind to 0.0.0.0 and the HF-provided $PORT
20
+ CMD uvicorn app:app --host 0.0.0.0 --port $PORT