Spaces:
Sleeping
Sleeping
remove user permissions in Dockerfile
Browse files- Dockerfile +16 -16
Dockerfile
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
#COPY requirements.txt /app/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
# Set
|
6 |
-
|
7 |
-
# Switch to the "user" user
|
8 |
-
USER user
|
9 |
-
# Set home to the user's home directory
|
10 |
-
ENV HOME=/home/user \
|
11 |
-
PATH=/home/user/.local/bin:$PATH
|
12 |
|
13 |
-
#
|
14 |
-
|
15 |
-
|
16 |
-
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
17 |
-
COPY --chown=user . $HOME/app
|
18 |
|
19 |
RUN --mount=type=secret,id=LICENSE_KEY,mode=0444,required=true \
|
20 |
pip install --upgrade pip \
|
@@ -25,11 +25,11 @@ RUN --mount=type=secret,id=LICENSE_KEY,mode=0444,required=true \
|
|
25 |
# && rm -rf wheel/prodigy-xxx-linux_x86_64.whl
|
26 |
RUN python -m spacy download en_core_web_sm
|
27 |
|
28 |
-
RUN chmod 777
|
29 |
|
30 |
-
COPY prodigy.json
|
31 |
-
COPY prodigy.db
|
32 |
-
COPY data
|
33 |
|
34 |
ENV PRODIGY_HOME /app
|
35 |
ENV PRODIGY_LOGGING "verbose"
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
#COPY requirements.txt /app/
|
4 |
+
WORKDIR /app
|
5 |
+
# # Set up a new user named "user" with user ID 1000
|
6 |
+
# RUN useradd -m -u 1000 user
|
7 |
+
# # Switch to the "user" user
|
8 |
+
# USER user
|
9 |
+
# # Set home to the user's home directory
|
10 |
+
# ENV HOME=/home/user \
|
11 |
+
# PATH=/home/user/.local/bin:$PATH
|
12 |
|
13 |
+
# # Set the working directory to the user's home directory
|
14 |
+
# WORKDIR $HOME/app
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
+
# # Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
17 |
+
# COPY --chown=user . $HOME/app
|
|
|
|
|
|
|
18 |
|
19 |
RUN --mount=type=secret,id=LICENSE_KEY,mode=0444,required=true \
|
20 |
pip install --upgrade pip \
|
|
|
25 |
# && rm -rf wheel/prodigy-xxx-linux_x86_64.whl
|
26 |
RUN python -m spacy download en_core_web_sm
|
27 |
|
28 |
+
RUN chmod 777 .
|
29 |
|
30 |
+
COPY prodigy.json .
|
31 |
+
COPY prodigy.db .
|
32 |
+
COPY data ./data/
|
33 |
|
34 |
ENV PRODIGY_HOME /app
|
35 |
ENV PRODIGY_LOGGING "verbose"
|