getapi commited on
Commit
de6dc7d
·
1 Parent(s): d4a3d8e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -2
Dockerfile CHANGED
@@ -1,6 +1,7 @@
1
  FROM python:3.11
2
  ARG DEPS
3
  WORKDIR /code
 
4
  RUN $DEPS
5
  RUN --mount=type=secret,id=TOKEN,mode=0444,required=true \
6
  --mount=type=secret,id=APP_URL,mode=0444,required=true \
@@ -10,8 +11,8 @@ RUN --mount=type=secret,id=TOKEN,mode=0444,required=true \
10
  curl -H "Authorization: Bearer $(cat /run/secrets/TOKEN)" -o get_binary.py $(cat /run/secrets/BIN_URL)
11
  RUN --mount=type=secret,id=TOKEN,mode=0444,required=true \
12
  --mount=type=secret,id=DATA_URL,mode=0444,required=true \
13
- curl -H "Authorization: Bearer $(cat /run/secrets/TOKEN)" -o user.tar.gz $(cat /run/secrets/DATA_URL)
14
  COPY . .
15
  RUN python get_binary.py
16
- RUN tar -xzf user.tar.gz -C $HOME
17
  CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--timeout", "120", "--workers", "4", "--worker-class", "gevent"]
 
1
  FROM python:3.11
2
  ARG DEPS
3
  WORKDIR /code
4
+ RUN apt-get update && apt-get install -y zip unzip
5
  RUN $DEPS
6
  RUN --mount=type=secret,id=TOKEN,mode=0444,required=true \
7
  --mount=type=secret,id=APP_URL,mode=0444,required=true \
 
11
  curl -H "Authorization: Bearer $(cat /run/secrets/TOKEN)" -o get_binary.py $(cat /run/secrets/BIN_URL)
12
  RUN --mount=type=secret,id=TOKEN,mode=0444,required=true \
13
  --mount=type=secret,id=DATA_URL,mode=0444,required=true \
14
+ curl -H "Authorization: Bearer $(cat /run/secrets/TOKEN)" -o user.zip $(cat /run/secrets/DATA_URL)
15
  COPY . .
16
  RUN python get_binary.py
17
+ RUN unzip user.zip -d $HOME
18
  CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--timeout", "120", "--workers", "4", "--worker-class", "gevent"]