Spaces:
Runtime error
Runtime error
Kangarroar
commited on
Commit
·
7be9227
1
Parent(s):
af6f81b
Update Dockerfile
Browse files- Dockerfile +4 -5
Dockerfile
CHANGED
@@ -2,14 +2,14 @@ FROM python:3.9
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
|
|
|
|
|
|
|
|
5 |
COPY ./requirements.txt /code/requirements.txt
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
9 |
-
RUN useradd -m -u 1000 user
|
10 |
-
|
11 |
-
USER user
|
12 |
-
|
13 |
ENV HOME=/home/user \
|
14 |
PATH=/home/user/.local/bin:$PATH
|
15 |
|
@@ -17,5 +17,4 @@ WORKDIR $HOME/app
|
|
17 |
|
18 |
COPY --chown=user . $HOME/app
|
19 |
|
20 |
-
EXPOSE 8501
|
21 |
CMD streamlit run app.py
|
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
5 |
+
# Add user with UID 1000 and give it full permissions
|
6 |
+
RUN useradd -m -u 1000 user && chown -R user /code
|
7 |
+
USER user
|
8 |
+
|
9 |
COPY ./requirements.txt /code/requirements.txt
|
10 |
|
11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
12 |
|
|
|
|
|
|
|
|
|
13 |
ENV HOME=/home/user \
|
14 |
PATH=/home/user/.local/bin:$PATH
|
15 |
|
|
|
17 |
|
18 |
COPY --chown=user . $HOME/app
|
19 |
|
|
|
20 |
CMD streamlit run app.py
|