Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +15 -2
Dockerfile
CHANGED
@@ -2,11 +2,24 @@ FROM python:3.11.6
|
|
2 |
|
3 |
ENV DEBIAN_FRONTEND=noninteractive
|
4 |
|
|
|
|
|
5 |
RUN apt-get update
|
6 |
RUN apt-get install -y openslide-tools
|
7 |
|
8 |
-
|
9 |
|
10 |
-
|
|
|
|
|
|
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
|
|
|
2 |
|
3 |
ENV DEBIAN_FRONTEND=noninteractive
|
4 |
|
5 |
+
WORKDIR /code
|
6 |
+
|
7 |
RUN apt-get update
|
8 |
RUN apt-get install -y openslide-tools
|
9 |
|
10 |
+
RUN useradd -m -u 1000 user
|
11 |
|
12 |
+
USER user
|
13 |
+
|
14 |
+
ENV HOME=/home/user \
|
15 |
+
PATH=/home/user/.local/bin:$PATH
|
16 |
|
17 |
+
# Set the working directory to the user's home directory
|
18 |
+
WORKDIR $HOME/app
|
19 |
+
|
20 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
21 |
+
COPY --chown=user . $HOME/app
|
22 |
+
|
23 |
+
RUN pip install -r requirements.txt
|
24 |
|
25 |
+
RUN ["python", "app.py"]
|