create user
Browse files- Dockerfile +16 -6
Dockerfile
CHANGED
@@ -10,18 +10,28 @@ RUN cd espeak-ng && \
|
|
10 |
make && \
|
11 |
make install
|
12 |
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
RUN pip install -r requirements.txt
|
17 |
|
18 |
-
COPY engine.py .
|
19 |
-
COPY app.py .
|
20 |
|
21 |
RUN mkdir -p cache && chmod 777 cache
|
22 |
|
23 |
-
ENV NUMBA_CACHE_DIR
|
24 |
-
ENV MPLCONFIGDIR
|
25 |
|
26 |
EXPOSE 7860
|
27 |
|
|
|
10 |
make && \
|
11 |
make install
|
12 |
|
13 |
+
RUN useradd -m -u 1000 user
|
14 |
+
|
15 |
+
USER user
|
16 |
+
|
17 |
+
ENV HOME=/home/user \
|
18 |
+
PATH=/home/user/.local/bin:$PATH
|
19 |
+
|
20 |
+
# Set the working directory to the user's home directory
|
21 |
+
WORKDIR $HOME/app
|
22 |
+
|
23 |
+
COPY --chown=user requirements.txt .
|
24 |
+
COPY --chown=user models .
|
25 |
|
26 |
RUN pip install -r requirements.txt
|
27 |
|
28 |
+
COPY --chown=user engine.py .
|
29 |
+
COPY --chown=user app.py .
|
30 |
|
31 |
RUN mkdir -p cache && chmod 777 cache
|
32 |
|
33 |
+
ENV NUMBA_CACHE_DIR=/home/user/cache
|
34 |
+
ENV MPLCONFIGDIR=/home/user/cache
|
35 |
|
36 |
EXPOSE 7860
|
37 |
|