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