Update Dockerfile
Browse files- Dockerfile +10 -3
Dockerfile
CHANGED
|
@@ -61,17 +61,24 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
| 61 |
|
| 62 |
#COPY --chown=user teaching_arithmetic /teaching_arithmetic
|
| 63 |
#COPY --chown=user . /app
|
| 64 |
-
COPY . /app
|
| 65 |
COPY ./out /out
|
|
|
|
|
|
|
| 66 |
#RUN chmod +x /out
|
| 67 |
COPY ./out/addition_train /out/
|
| 68 |
RUN chmod 777 /teaching_arithmetic/train.py
|
| 69 |
COPY ./train.sh /train.sh
|
| 70 |
RUN chmod +x /train.sh
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
# USER 1000
|
| 73 |
|
| 74 |
-
RUN ["chmod", "777", "/out"]
|
| 75 |
|
| 76 |
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 77 |
ENTRYPOINT ["/train.sh"]
|
|
|
|
| 61 |
|
| 62 |
#COPY --chown=user teaching_arithmetic /teaching_arithmetic
|
| 63 |
#COPY --chown=user . /app
|
| 64 |
+
#COPY . /app
|
| 65 |
COPY ./out /out
|
| 66 |
+
RUN chmod 777 -R /out
|
| 67 |
+
|
| 68 |
#RUN chmod +x /out
|
| 69 |
COPY ./out/addition_train /out/
|
| 70 |
RUN chmod 777 /teaching_arithmetic/train.py
|
| 71 |
COPY ./train.sh /train.sh
|
| 72 |
RUN chmod +x /train.sh
|
| 73 |
+
|
| 74 |
+
# Expose the secret DEBUG at buildtime and use its value as git remote URL
|
| 75 |
+
#RUN --mount=type=secret,id=DEBUG,mode=0444,required=true \
|
| 76 |
+
# git init && \
|
| 77 |
+
# git remote add origin $(cat /run/secrets/DEBUG)
|
| 78 |
+
|
| 79 |
+
|
| 80 |
# USER 1000
|
| 81 |
|
|
|
|
| 82 |
|
| 83 |
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 84 |
ENTRYPOINT ["/train.sh"]
|