BG5 commited on
Commit
9d6561a
·
1 Parent(s): bd62bc2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -10
Dockerfile CHANGED
@@ -7,25 +7,29 @@ FROM python:3.10-slim-bullseye
7
 
8
  # RUN echo /etc/apt/sources.list
9
  # RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
10
- ENV BUILD_PREFIX=/app
11
- ENV PATH="$PATH:/root/.local/bin"
12
- ADD . ${BUILD_PREFIX}
 
 
 
 
 
 
 
 
 
13
 
14
  RUN apt-get update \
15
  &&apt-get install -y --no-install-recommends bash ffmpeg espeak libavcodec-extra\
16
- && cd ${BUILD_PREFIX} \
17
  && /usr/local/bin/python -m pip install --no-cache --upgrade pip \
18
  && pip install --no-cache -r requirements.txt \
19
  && pip install --no-cache -r requirements-optional.txt \
20
  && pip install azure-cognitiveservices-speech
21
 
22
- WORKDIR ${BUILD_PREFIX}
23
 
24
  ADD docker/entrypoint.sh /entrypoint.sh
25
 
26
- RUN chmod +x /entrypoint.sh
27
- RUN useradd -m -u 1000 noroot
28
-
29
- USER noroot
30
-
31
  ENTRYPOINT ["/entrypoint.sh"]
 
7
 
8
  # RUN echo /etc/apt/sources.list
9
  # RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
10
+ RUN chmod +x /entrypoint.sh
11
+ RUN useradd -m -u 1000 user
12
+ USER user
13
+ ENV HOME=/home/user \
14
+ PATH=/home/user/.local/bin:$PATH
15
+ WORKDIR $HOME/app
16
+ COPY --chown=user . $HOME/app
17
+ RUN chmod 777 /app
18
+
19
+ # ENV BUILD_PREFIX=/app
20
+ # ENV PATH="$PATH:/root/.local/bin"
21
+ ADD --chown=user . $HOME
22
 
23
  RUN apt-get update \
24
  &&apt-get install -y --no-install-recommends bash ffmpeg espeak libavcodec-extra\
25
+ && cd $HOME \
26
  && /usr/local/bin/python -m pip install --no-cache --upgrade pip \
27
  && pip install --no-cache -r requirements.txt \
28
  && pip install --no-cache -r requirements-optional.txt \
29
  && pip install azure-cognitiveservices-speech
30
 
31
+ WORKDIR $HOME
32
 
33
  ADD docker/entrypoint.sh /entrypoint.sh
34
 
 
 
 
 
 
35
  ENTRYPOINT ["/entrypoint.sh"]