Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -14
Dockerfile
CHANGED
@@ -1,26 +1,24 @@
|
|
1 |
FROM python:3.10.12
|
2 |
|
3 |
-
|
4 |
-
RUN useradd -m -u 1000 user
|
5 |
-
USER user
|
6 |
-
|
7 |
-
ENV HOME=/home/user \
|
8 |
-
PATH=/home/user/.local/bin:$PATH
|
9 |
-
WORKDIR $HOME/app
|
10 |
-
|
11 |
-
|
12 |
-
COPY --chown=user . $HOME/app
|
13 |
-
#ADD --chown=user ./.streamlit $HOME/app/.streamlit
|
14 |
-
RUN chown user:user -R $HOME/app
|
15 |
|
16 |
COPY ./requirements.txt /app/requirements.txt
|
17 |
COPY ./packages.txt /app/packages.txt
|
18 |
|
|
|
|
|
19 |
|
20 |
-
|
21 |
-
RUN
|
|
|
|
|
|
|
22 |
|
|
|
|
|
|
|
23 |
COPY --chown=user . $HOME/app
|
|
|
24 |
|
25 |
EXPOSE 8501
|
26 |
CMD streamlit run app.py \
|
|
|
1 |
FROM python:3.10.12
|
2 |
|
3 |
+
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
COPY ./requirements.txt /app/requirements.txt
|
6 |
COPY ./packages.txt /app/packages.txt
|
7 |
|
8 |
+
RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
|
9 |
+
RUN pip3 install --no-cache-dir -r /app/requirements.txt
|
10 |
|
11 |
+
# User
|
12 |
+
RUN useradd -m -u 1000 user
|
13 |
+
USER user
|
14 |
+
ENV HOME /home/user
|
15 |
+
ENV PATH $HOME/.local/bin:$PATH
|
16 |
|
17 |
+
WORKDIR $HOME
|
18 |
+
RUN mkdir app
|
19 |
+
WORKDIR $HOME/app
|
20 |
COPY --chown=user . $HOME/app
|
21 |
+
RUN chown user:user -R $HOME/app
|
22 |
|
23 |
EXPOSE 8501
|
24 |
CMD streamlit run app.py \
|