iskoldt-X commited on
Commit
9356981
·
unverified ·
1 Parent(s): 3c73e2d

Reduce building duration

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -1,13 +1,13 @@
1
- FROM python:3.9 as builder
2
  RUN apt-get update && apt-get install -y build-essential
3
  COPY requirements.txt .
4
  RUN pip install --user -r requirements.txt
5
 
6
- FROM python:3.9
7
  MAINTAINER iskoldt
8
  COPY --from=builder /root/.local /root/.local
9
  ENV PATH=/root/.local/bin:$PATH
10
- COPY . /app
11
  WORKDIR /app
 
12
  ENV my_api_key empty
13
  CMD ["python3", "-u", "ChuanhuChatbot.py", "2>&1", "|", "tee", "/var/log/application.log"]
 
1
+ FROM python:3.9-slim-buster as builder
2
  RUN apt-get update && apt-get install -y build-essential
3
  COPY requirements.txt .
4
  RUN pip install --user -r requirements.txt
5
 
6
+ FROM python:3.9-slim-buster
7
  MAINTAINER iskoldt
8
  COPY --from=builder /root/.local /root/.local
9
  ENV PATH=/root/.local/bin:$PATH
 
10
  WORKDIR /app
11
+ COPY ChuanhuChatbot.py .
12
  ENV my_api_key empty
13
  CMD ["python3", "-u", "ChuanhuChatbot.py", "2>&1", "|", "tee", "/var/log/application.log"]