Update Dockerfile
Browse files- Dockerfile +7 -0
Dockerfile
CHANGED
@@ -33,6 +33,13 @@ RUN pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url h
|
|
33 |
|
34 |
# COPY --chown=user . /home/user
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
ADD "https://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@api.github.com/repos/zqh0253/tmp_berf/commits?per_page=1" latest_commit
|
37 |
RUN git clone https://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@github.com/zqh0253/tmp_berf.git berf
|
38 |
COPY --chown=user . /home/user/berf
|
|
|
33 |
|
34 |
# COPY --chown=user . /home/user
|
35 |
|
36 |
+
ARG USER_NAME=berf
|
37 |
+
ARG GROUP_NAME=berf
|
38 |
+
# Change user to non-root user
|
39 |
+
RUN groupadd -g ${GID} ${GROUP_NAME} \
|
40 |
+
&& useradd -ms /bin/sh -u ${UID} -g ${GID} ${USER_NAME}
|
41 |
+
USER ${USER_NAME}
|
42 |
+
|
43 |
ADD "https://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@api.github.com/repos/zqh0253/tmp_berf/commits?per_page=1" latest_commit
|
44 |
RUN git clone https://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@github.com/zqh0253/tmp_berf.git berf
|
45 |
COPY --chown=user . /home/user/berf
|