triflix commited on
Commit
3fedc6d
·
verified ·
1 Parent(s): ef07840

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile
2
+ FROM python:3.11-slim
3
+
4
+ # create app dir
5
+ WORKDIR /app
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # copy project files
9
+ COPY . /app
10
+
11
+ # install deps
12
+ RUN pip install --upgrade pip
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # create templates directory permissions
16
+ RUN mkdir -p /tmp && chmod -R 777 /tmp
17
+
18
+ # expose HF spaces port
19
+ EXPOSE 7860
20
+
21
+ # default command: run uvicorn
22
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]