Update Dockerfile
Browse files- Dockerfile +16 -11
Dockerfile
CHANGED
|
@@ -2,18 +2,22 @@
|
|
| 2 |
|
| 3 |
FROM python:3.9
|
| 4 |
|
| 5 |
-
RUN useradd -m -u 1000 user
|
| 6 |
-
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
-
COPY --chown=user ./requirements.txt requirements.txt
|
| 10 |
-
|
| 11 |
-
RUN
|
| 12 |
-
RUN python3.9 -m pip install --upgrade pip
|
| 13 |
-
RUN git clone https://github.com/lee-ny/teaching_arithmetic.git /teaching_arithmetic && cd teaching_arithmetic && pip install -e .
|
| 14 |
-
RUN chmod +x /teaching_arithmetic
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
USER user
|
| 19 |
|
|
@@ -82,9 +86,10 @@ ARG TARGETPLATFORM
|
|
| 82 |
#RUN chmod +x /out
|
| 83 |
#COPY ./out/addition_train /out/
|
| 84 |
#RUN chmod +x /teaching_arithmetic/train.py
|
| 85 |
-
COPY ./train.sh /train.sh
|
| 86 |
-
RUN chmod +x /train.sh
|
| 87 |
|
|
|
|
| 88 |
|
| 89 |
# Expose the secret DEBUG at buildtime and use its value as git remote URL
|
| 90 |
#RUN --mount=type=secret,id=DEBUG,mode=0444,required=true \
|
|
|
|
| 2 |
|
| 3 |
FROM python:3.9
|
| 4 |
|
|
|
|
|
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
COPY --chown=user ./requirements.txt /app/requirements.txt
|
| 8 |
+
COPY --chown=user ./train.sh /app/train.sh
|
| 9 |
+
RUN chmod +x /app/train.sh
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
| 12 |
+
RUN git clone https://github.com/lee-ny/teaching_arithmetic.git /teaching_arithmetic
|
| 13 |
+
#&& cd teaching_arithmetic && pip install -e .
|
| 14 |
+
COPY --chown=user /teaching_arithmetic /app/teaching_arithmetic
|
| 15 |
+
|
| 16 |
+
#RUN chmod +x /teaching_arithmetic
|
| 17 |
+
|
| 18 |
+
#COPY --chown=user . /app
|
| 19 |
+
|
| 20 |
+
RUN useradd -m -u 1000 user
|
| 21 |
|
| 22 |
USER user
|
| 23 |
|
|
|
|
| 86 |
#RUN chmod +x /out
|
| 87 |
#COPY ./out/addition_train /out/
|
| 88 |
#RUN chmod +x /teaching_arithmetic/train.py
|
| 89 |
+
#COPY ./train.sh /train.sh
|
| 90 |
+
#RUN chmod +x /train.sh
|
| 91 |
|
| 92 |
+
COPY --chown=user . /app
|
| 93 |
|
| 94 |
# Expose the secret DEBUG at buildtime and use its value as git remote URL
|
| 95 |
#RUN --mount=type=secret,id=DEBUG,mode=0444,required=true \
|