Mr-Help commited on
Commit
0c76365
·
verified ·
1 Parent(s): 815edf3

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
7
+ ENV PORT=7860
8
+
9
+ # install dependencies
10
+ COPY requirements.txt .
11
+ RUN pip install --no-cache-dir --upgrade pip && \
12
+ pip install --no-cache-dir -r requirements.txt
13
+
14
+ # copy project files
15
+ COPY . .
16
+
17
+ # expose port required by HuggingFace Spaces
18
+ EXPOSE 7860
19
+
20
+ # run api
21
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]