Update Dockerfile
Browse files- Dockerfile +11 -10
Dockerfile
CHANGED
@@ -7,14 +7,15 @@ FROM python:3.9
|
|
7 |
RUN useradd -m -u 1000 user
|
8 |
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
COPY --chown=user ./train.sh /app/train.sh
|
14 |
-
RUN chmod +x /app/train.sh
|
15 |
|
16 |
-
RUN pip install --no-cache-dir --upgrade -r /
|
17 |
RUN git clone https://github.com/lee-ny/teaching_arithmetic.git /teaching_arithmetic
|
|
|
|
|
|
|
18 |
#&& cd teaching_arithmetic && pip install -e .
|
19 |
#COPY --chown=user /teaching_arithmetic /app/teaching_arithmetic
|
20 |
|
@@ -25,6 +26,8 @@ RUN git clone https://github.com/lee-ny/teaching_arithmetic.git /teaching_arithm
|
|
25 |
|
26 |
USER user
|
27 |
|
|
|
|
|
28 |
ENV PATH="/home/user/.local/bin:/opt/conda/bin:$PATH"
|
29 |
ENV HOME="/home/user"
|
30 |
|
@@ -93,8 +96,6 @@ ARG TARGETPLATFORM
|
|
93 |
#COPY ./train.sh /train.sh
|
94 |
#RUN chmod +x /train.sh
|
95 |
|
96 |
-
COPY --chown=user . /app
|
97 |
-
|
98 |
# Expose the secret DEBUG at buildtime and use its value as git remote URL
|
99 |
#RUN --mount=type=secret,id=DEBUG,mode=0444,required=true \
|
100 |
# git init && \
|
@@ -102,7 +103,7 @@ COPY --chown=user . /app
|
|
102 |
|
103 |
|
104 |
# USER 1000
|
105 |
-
|
106 |
|
107 |
#CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
108 |
-
ENTRYPOINT ["/
|
|
|
7 |
RUN useradd -m -u 1000 user
|
8 |
|
9 |
|
10 |
+
COPY --chown=user ./requirements.txt /requirements.txt
|
11 |
+
COPY --chown=user ./train.sh /train.sh
|
12 |
+
RUN chmod +x /train.sh
|
|
|
|
|
13 |
|
14 |
+
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
15 |
RUN git clone https://github.com/lee-ny/teaching_arithmetic.git /teaching_arithmetic
|
16 |
+
|
17 |
+
COPY --chown=user . /app
|
18 |
+
|
19 |
#&& cd teaching_arithmetic && pip install -e .
|
20 |
#COPY --chown=user /teaching_arithmetic /app/teaching_arithmetic
|
21 |
|
|
|
26 |
|
27 |
USER user
|
28 |
|
29 |
+
WORKDIR /app
|
30 |
+
|
31 |
ENV PATH="/home/user/.local/bin:/opt/conda/bin:$PATH"
|
32 |
ENV HOME="/home/user"
|
33 |
|
|
|
96 |
#COPY ./train.sh /train.sh
|
97 |
#RUN chmod +x /train.sh
|
98 |
|
|
|
|
|
99 |
# Expose the secret DEBUG at buildtime and use its value as git remote URL
|
100 |
#RUN --mount=type=secret,id=DEBUG,mode=0444,required=true \
|
101 |
# git init && \
|
|
|
103 |
|
104 |
|
105 |
# USER 1000
|
106 |
+
RUN chmod +x train.sh
|
107 |
|
108 |
#CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
109 |
+
ENTRYPOINT ["/train.sh"]
|