triflix commited on
Commit
f3c90ed
·
verified ·
1 Parent(s): ea760a5

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 PYTHONUNBUFFERED=1
4
+ ENV TMP_DIR=/tmp
5
+
6
+ WORKDIR /app
7
+
8
+ COPY requirements.txt /app/
9
+ RUN apt-get update && apt-get install -y --no-install-recommends build-essential \
10
+ && pip install --upgrade pip \
11
+ && pip install --no-cache-dir -r requirements.txt \
12
+ && apt-get purge -y --auto-remove build-essential \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ COPY app /app
16
+ COPY . /app
17
+
18
+ EXPOSE 7860
19
+
20
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]