cadyderwin commited on
Commit
fb22874
·
verified ·
1 Parent(s): 18f50ed

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -12
Dockerfile CHANGED
@@ -1,19 +1,23 @@
1
  FROM python:3.8-slim
2
  RUN apt-get update && \
3
- apt-get install -y binutils && \
4
  rm -rf /var/lib/apt/lists/*
5
 
6
- WORKDIR /home/opyidlive
7
- COPY ./opyidlive.py .
8
- COPY ./app.py .
9
- COPY ./demo.py .
10
- COPY ./license.txt .
11
- COPY ./requirements.txt .
12
- COPY ./run.sh .
13
- COPY ./examples ./examples
14
- COPY ./model ./model
15
- COPY ./lib /usr/lib
16
- COPY ./lib/libopyidlive.so ./lib/libopyidlive.so
 
 
 
 
17
  RUN pip3 install -r requirements.txt
18
  RUN chmod a+x run.sh
19
  CMD ["./run.sh"]
 
1
  FROM python:3.8-slim
2
  RUN apt-get update && \
3
+ apt-get install -y binutils wget curl procps git git-lfs && \
4
  rm -rf /var/lib/apt/lists/*
5
 
6
+ RUN useradd -m -u 1000 user
7
+ USER user
8
+ ENV PATH="/home/user/.local/bin:$PATH"
9
+
10
+ WORKDIR /app
11
+ COPY --chown=user ./opyidlive.py .
12
+ COPY --chown=user ./app.py .
13
+ COPY --chown=user ./demo.py .
14
+ COPY --chown=user ./license.txt .
15
+ COPY --chown=user ./requirements.txt .
16
+ COPY --chown=user ./run.sh .
17
+ COPY --chown=user ./examples ./examples
18
+ COPY --chown=user ./model ./model
19
+ COPY --chown=user ./lib /usr/lib
20
+ COPY --chown=user ./lib/libopyidlive.so ./lib/libopyidlive.so
21
  RUN pip3 install -r requirements.txt
22
  RUN chmod a+x run.sh
23
  CMD ["./run.sh"]