alessandro trinca tornidor commited on
Commit
29d4b23
1 Parent(s): c5dad53

ci: docker, re-add docker_entrypoint.sh and entrypoint.sh scripts, install nodejs in runtime stage

Browse files
Dockerfile CHANGED
@@ -94,6 +94,10 @@ RUN echo "RUNTIME: remove libz.s* to force upgrade" && rm /usr/lib/${ARCH}-linux
94
  COPY --from=builder_global /usr/lib/${ARCH}-linux-gnu/libz.so* /usr/lib/${ARCH}-linux-gnu/
95
  RUN echo "RUNTIME: check libz.s* after copy" && ls -l /usr/lib/${ARCH}-linux-gnu/libz.so*
96
  COPY --from=builder_global ${LAMBDA_TASK_ROOT}/.venv ${LAMBDA_TASK_ROOT}/.venv
 
 
 
 
97
 
98
  RUN echo "new LAMBDA_TASK_ROOT after hidden venv copy => ${LAMBDA_TASK_ROOT}"
99
  RUN ls -ld ${LAMBDA_TASK_ROOT}/
@@ -101,6 +105,11 @@ RUN ls -lA ${LAMBDA_TASK_ROOT}/
101
  RUN echo "content of LAMBDA_TASK_ROOT/.venv => ${LAMBDA_TASK_ROOT}/.venv"
102
  RUN ls -ld ${LAMBDA_TASK_ROOT}/.venv
103
  RUN ls -lA ${LAMBDA_TASK_ROOT}/.venv
 
 
 
 
 
104
 
105
 
106
  ### conditional section
@@ -201,9 +210,9 @@ RUN ls -lA ${LAMBDA_TASK_ROOT}/
201
  RUN ls -l ${LAMBDA_TASK_ROOT}/.venv
202
  RUN ls -l ${LAMBDA_TASK_ROOT}/.venv/bin/activate
203
 
204
- # CMD ["/var/task/docker_entrypoint.sh"]
205
  #CMD [
206
  # "source", "/var/task/.venv/bin/activate", "&&",
207
  # "uvicorn", "app:app", "--host","0.0.0.0", "--port", "7860"
208
  #]
209
- CMD ["/usr/bin/bash", "-c", "source /var/task/.venv/bin/activate && uvicorn app:app --host 0.0.0.0 --port 7860"]
 
 
94
  COPY --from=builder_global /usr/lib/${ARCH}-linux-gnu/libz.so* /usr/lib/${ARCH}-linux-gnu/
95
  RUN echo "RUNTIME: check libz.s* after copy" && ls -l /usr/lib/${ARCH}-linux-gnu/libz.so*
96
  COPY --from=builder_global ${LAMBDA_TASK_ROOT}/.venv ${LAMBDA_TASK_ROOT}/.venv
97
+ RUN echo "COPY --from=builder_global ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda/scripts/docker_entrypoint.sh ${LAMBDA_TASK_ROOT}/"
98
+ COPY --from=builder_global ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda/scripts/docker_entrypoint.sh ${LAMBDA_TASK_ROOT}/
99
+ RUN echo "COPY --from=builder_global ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda/scripts/entrypoint.sh ${LAMBDA_TASK_ROOT}/"
100
+ COPY --from=builder_global ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda/scripts/entrypoint.sh ${LAMBDA_TASK_ROOT}/
101
 
102
  RUN echo "new LAMBDA_TASK_ROOT after hidden venv copy => ${LAMBDA_TASK_ROOT}"
103
  RUN ls -ld ${LAMBDA_TASK_ROOT}/
 
105
  RUN echo "content of LAMBDA_TASK_ROOT/.venv => ${LAMBDA_TASK_ROOT}/.venv"
106
  RUN ls -ld ${LAMBDA_TASK_ROOT}/.venv
107
  RUN ls -lA ${LAMBDA_TASK_ROOT}/.venv
108
+ RUN ls -lA ${LAMBDA_TASK_ROOT}/docker_entrypoint.sh
109
+ RUN ls -lA ${LAMBDA_TASK_ROOT}/entrypoint.sh
110
+ RUN apt update && apt install --no-cache nodejs -y
111
+ RUN which node
112
+ RUN which npm
113
 
114
 
115
  ### conditional section
 
210
  RUN ls -l ${LAMBDA_TASK_ROOT}/.venv
211
  RUN ls -l ${LAMBDA_TASK_ROOT}/.venv/bin/activate
212
 
 
213
  #CMD [
214
  # "source", "/var/task/.venv/bin/activate", "&&",
215
  # "uvicorn", "app:app", "--host","0.0.0.0", "--port", "7860"
216
  #]
217
+ # CMD ["/usr/bin/bash", "-c", "source /var/task/.venv/bin/activate && uvicorn app:app --host 0.0.0.0 --port 7860"]
218
+ CMD ["/var/task/docker_entrypoint.sh"]
docker_entrypoint.sh → scripts/docker_entrypoint.sh RENAMED
File without changes
entrypoint.sh → scripts/entrypoint.sh RENAMED
File without changes