triflix commited on
Commit
1233e2a
·
verified ·
1 Parent(s): ca70b65

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -3,17 +3,18 @@ FROM python:3.11-slim
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
 
16
 
17
  EXPOSE 7860
18
 
19
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
 
3
  ENV PYTHONUNBUFFERED=1
4
  ENV TMP_DIR=/tmp
5
 
6
+ WORKDIR /workspace
7
 
8
+ COPY requirements.txt /workspace/
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 package folder
16
+ COPY app /workspace/app
17
 
18
  EXPOSE 7860
19
 
20
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]