alessandro trinca tornidor commited on
Commit
65803bd
1 Parent(s): c1ebf60

[ci] update base docker image nvcr.io/nvidia/pytorch to 24.03-py3

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -3
Dockerfile CHANGED
@@ -10,7 +10,7 @@ ARG POETRY_CACHE_DIR=/tmp/poetry_cache
10
  ARG DEPENDENCY_GROUP=fastapi
11
 
12
 
13
- FROM nvcr.io/nvidia/pytorch:24.01-py3 as builder_global
14
 
15
  LABEL authors="alessandro@trinca.tornidor.com"
16
 
@@ -68,8 +68,9 @@ RUN git clone -n --depth=1 --filter=tree:0 https://huggingface.co/spaces/aletrn/
68
  git sparse-checkout set --no-cone resources && \
69
  git checkout
70
  WORKDIR ${LAMBDA_TASK_ROOT}
 
71
 
72
- FROM nvcr.io/nvidia/pytorch:24.01-py3 as runtime
73
 
74
  ARG ARCH
75
  ARG LAMBDA_TASK_ROOT
@@ -88,6 +89,7 @@ COPY --from=builder_global ${LAMBDA_TASK_ROOT}/.venv ${LAMBDA_TASK_ROOT}/.venv
88
  RUN echo "new LAMBDA_TASK_ROOT after hidden venv copy => ${LAMBDA_TASK_ROOT}"
89
  RUN ls -ld ${LAMBDA_TASK_ROOT}/
90
  RUN ls -lA ${LAMBDA_TASK_ROOT}/
 
91
  RUN ls -ld ${LAMBDA_TASK_ROOT}/.venv
92
  RUN ls -lA ${LAMBDA_TASK_ROOT}/.venv
93
 
@@ -113,7 +115,8 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store if [ "${DEPENDENCY_GROUP}" = "
113
  pnpm install --prod --frozen-lockfile; else \
114
  echo "DEPENDENCY_GROUP 1: ${DEPENDENCY_GROUP} ..."; fi
115
  # here multiple conditions concatenated to avoid failing on check
116
- RUN if [ "${DEPENDENCY_GROUP}" = "fastapi" ]; then if [ ! -d /appnode/node_modules ]; then echo "no node_modules folder" && exit 1; fi; fi
 
117
 
118
 
119
  FROM node_fastapi AS node_build
@@ -143,6 +146,8 @@ RUN mkdir -p ${FASTAPI_STATIC}
143
 
144
  COPY --from=builder_global ${LAMBDA_TASK_ROOT}/sam-quantized/machine_learning_models \
145
  ${LAMBDA_TASK_ROOT}/machine_learning_models
 
 
146
  COPY --from=builder_global ${LAMBDA_TASK_ROOT}/lisa-on-cuda/resources ${LAMBDA_TASK_ROOT}/resources
147
  COPY --from=node_prod_deps /appnode/node_modules* ${FASTAPI_STATIC}/node_modules
148
  COPY --from=node_build /appnode/dist* ${FASTAPI_STATIC}/dist
 
10
  ARG DEPENDENCY_GROUP=fastapi
11
 
12
 
13
+ FROM nvcr.io/nvidia/pytorch:24.03-py3 as builder_global
14
 
15
  LABEL authors="alessandro@trinca.tornidor.com"
16
 
 
68
  git sparse-checkout set --no-cone resources && \
69
  git checkout
70
  WORKDIR ${LAMBDA_TASK_ROOT}
71
+ RUN ls -l ${LAMBDA_TASK_ROOT}//*
72
 
73
+ FROM nvcr.io/nvidia/pytorch:24.03-py3 as runtime
74
 
75
  ARG ARCH
76
  ARG LAMBDA_TASK_ROOT
 
89
  RUN echo "new LAMBDA_TASK_ROOT after hidden venv copy => ${LAMBDA_TASK_ROOT}"
90
  RUN ls -ld ${LAMBDA_TASK_ROOT}/
91
  RUN ls -lA ${LAMBDA_TASK_ROOT}/
92
+ RUN echo "content of LAMBDA_TASK_ROOT/.venv => ${LAMBDA_TASK_ROOT}/.venv"
93
  RUN ls -ld ${LAMBDA_TASK_ROOT}/.venv
94
  RUN ls -lA ${LAMBDA_TASK_ROOT}/.venv
95
 
 
115
  pnpm install --prod --frozen-lockfile; else \
116
  echo "DEPENDENCY_GROUP 1: ${DEPENDENCY_GROUP} ..."; fi
117
  # here multiple conditions concatenated to avoid failing on check
118
+ RUN if [ "${DEPENDENCY_GROUP}" = "fastapi" ]; then if [ ! -d /appnode/node_modules ]; then \
119
+ echo "no node_modules folder" && exit 1; fi; fi
120
 
121
 
122
  FROM node_fastapi AS node_build
 
146
 
147
  COPY --from=builder_global ${LAMBDA_TASK_ROOT}/sam-quantized/machine_learning_models \
148
  ${LAMBDA_TASK_ROOT}/machine_learning_models
149
+ RUN ls -ld ${LAMBDA_TASK_ROOT}/machine_learning_models
150
+ RUN ls -lh ${LAMBDA_TASK_ROOT}/machine_learning_models
151
  COPY --from=builder_global ${LAMBDA_TASK_ROOT}/lisa-on-cuda/resources ${LAMBDA_TASK_ROOT}/resources
152
  COPY --from=node_prod_deps /appnode/node_modules* ${FASTAPI_STATIC}/node_modules
153
  COPY --from=node_build /appnode/dist* ${FASTAPI_STATIC}/dist