Commit
•
2408076
1
Parent(s):
a9d067c
fix: permission
Browse files- Dockerfile +18 -9
Dockerfile
CHANGED
@@ -1,20 +1,29 @@
|
|
1 |
FROM python:3.9
|
2 |
-
RUN useradd -m -u 1000 user
|
3 |
-
USER user
|
4 |
-
|
5 |
ENV HOME=/home/user \
|
6 |
PATH=/home/user/.local/bin:$PATH
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
RUN mkdir -p $HOME/app/.cache
|
|
|
|
|
11 |
RUN chmod 777 $HOME/app/.cache
|
12 |
-
COPY ./requirements.txt $HOME/app/requirements.txt
|
13 |
|
14 |
-
|
|
|
15 |
|
16 |
-
|
|
|
17 |
|
18 |
COPY --chown=user . $HOME/app
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
CMD ["python", "$HOME/app/main.py"]
|
|
|
1 |
FROM python:3.9
|
|
|
|
|
|
|
2 |
ENV HOME=/home/user \
|
3 |
PATH=/home/user/.local/bin:$PATH
|
4 |
+
|
5 |
+
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
|
6 |
+
|
7 |
RUN mkdir -p $HOME/app/.cache
|
8 |
+
RUN useradd -m -u 1000 user
|
9 |
+
RUN chown -R user $HOME/
|
10 |
RUN chmod 777 $HOME/app/.cache
|
|
|
11 |
|
12 |
+
USER user
|
13 |
+
WORKDIR $HOME/app
|
14 |
|
15 |
+
ENV TRANSFORMERS_CACHE=$HOME/app/.cache \
|
16 |
+
HUGGINGFACE_HUB_CACHE=$HOME/app/.cache
|
17 |
|
18 |
COPY --chown=user . $HOME/app
|
19 |
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
|
25 |
+
RUN pip install --no-cache-dir --upgrade -r $HOME/app/requirements.txt
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
CMD ["python", "$HOME/app/main.py"]
|