Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +25 -5
Dockerfile
CHANGED
@@ -3,12 +3,32 @@
|
|
3 |
|
4 |
FROM python:3.9
|
5 |
|
6 |
-
|
7 |
|
8 |
-
|
|
|
9 |
|
10 |
-
RUN
|
11 |
|
12 |
-
|
|
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
FROM python:3.9
|
5 |
|
6 |
+
FROM python:latest
|
7 |
|
8 |
+
RUN apt-get update \
|
9 |
+
&& apt-get install unzip python
|
10 |
|
11 |
+
# RUN unzip img_align_celeba.zip -d .
|
12 |
|
13 |
+
# Set up a new user named "user" with user ID 1000
|
14 |
+
RUN useradd -m -u 1000 user
|
15 |
|
16 |
+
# Switch to the "user" user
|
17 |
+
USER user
|
18 |
+
|
19 |
+
# Set home to the user's home directory
|
20 |
+
ENV HOME=/home/user \
|
21 |
+
PATH=/home/user/.local/bin:$PATH
|
22 |
+
|
23 |
+
# Set the working directory to the user's home directory
|
24 |
+
WORKDIR $HOME/app
|
25 |
+
|
26 |
+
# Try and run pip command after setting the user with `USER user` to avoid permission issues with Python
|
27 |
+
RUN pip install --no-cache-dir --upgrade pip
|
28 |
+
|
29 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
30 |
+
COPY --chown=user . $HOME/app
|
31 |
+
|
32 |
+
RUN cbir_system.py
|
33 |
+
|
34 |
+
CMD ["python"]
|