@@ -16,29 +16,27 @@ RUN python3.11 \
16
16
17
17
RUN mkdir /home/getml/.getML
18
18
19
- # ###############################################################################
20
- # getml-amd64
21
- FROM getml-base AS getml-amd64
22
- ARG GETML_ARCH=x64
23
-
24
- # ###############################################################################
25
- # getml-arm64
26
- FROM getml-base AS getml-arm64
27
- ARG GETML_ARCH=arm64
28
19
29
20
# ###############################################################################
30
21
# getml-demo
31
- FROM getml-${TARGETARCH} AS getml-demo
22
+ FROM getml-base AS getml-demo
32
23
24
+ ARG TARGETARCH
33
25
ARG TARGETOS
34
- ARG GETML_VERSION
35
- ARG GETML_BUCKET="https://storage.googleapis.com/static.getml.com/download"
36
- ARG GETML_ENGINE_FILE="getml-${GETML_VERSION}-${GETML_ARCH}-${TARGETOS}.tar.gz"
37
- ARG GETML_ENGINE_URL="${GETML_BUCKET}/${GETML_VERSION}/${GETML_ENGINE_FILE}"
38
-
39
- RUN curl "${GETML_ENGINE_URL}" | tar -C /home/getml/.getML -xvzf -
26
+ RUN \
27
+ if [ "${TARGETARCH}" = "amd64" ]; then \
28
+ export GETML_ARCH="x64" ;\
29
+ else \
30
+ export GETML_ARCH="${TARGETARCH}" ;\
31
+ fi; \
32
+ export GETML_VERSION=$(grep -o "^getml=.*$" requirements.txt | cut -b8-) ;\
33
+ export GETML_BUCKET="https://storage.googleapis.com/static.getml.com/download" ;\
34
+ export GETML_ENGINE_FILE="getml-${GETML_VERSION}-${GETML_ARCH}-${TARGETOS}.tar.gz" ;\
35
+ export GETML_ENGINE_URL="${GETML_BUCKET}/${GETML_VERSION}/${GETML_ENGINE_FILE}" ;\
36
+ echo "Downloading getML engine from ${GETML_ENGINE_URL}" ;\
37
+ curl ${GETML_ENGINE_URL} | tar -C /home/getml/.getML -xvzf -
40
38
41
39
COPY --chown=getml:getml . /home/getml/demo/
42
40
43
41
EXPOSE 1709 8888
44
- CMD [ "/home/getml/.local/bin/jupyter" , "lab" , "--ip='*'" , "--port=8888" , "--notebook-dir='/home/getml/demo'" ]
42
+ CMD [ "/home/getml/.local/bin/jupyter" , "lab" , "--ip='*'" , "--port=8888" , "--notebook-dir='/home/getml/demo'" ]
0 commit comments