nikhil-xyz
commited on
Commit
•
c959aa6
1
Parent(s):
be8f80e
docker modified according to hugging face
Browse files- Dockerfile +12 -5
Dockerfile
CHANGED
@@ -1,12 +1,19 @@
|
|
1 |
FROM python:3.8-slim-buster
|
2 |
|
3 |
|
4 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
RUN pip install -r requirements.txt
|
11 |
|
12 |
CMD ["streamlit", "run", "app.py"]
|
|
|
1 |
FROM python:3.8-slim-buster
|
2 |
|
3 |
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
USER user
|
6 |
+
# Set home to the user's home directory
|
7 |
+
ENV HOME=/home/user \
|
8 |
+
PATH=/home/user/.local/bin:$PATH
|
9 |
+
WORKDIR $HOME/app
|
10 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
11 |
+
COPY --chown=user . $HOME/app
|
12 |
+
ADD --chown=user ./. $HOME/app/.
|
13 |
+
RUN chown user:user -R $HOME/app
|
14 |
|
15 |
+
COPY ./requirements.txt /code/requirements.txt
|
16 |
|
17 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
|
|
|
18 |
|
19 |
CMD ["streamlit", "run", "app.py"]
|