From f1b9e78a662df25b7be08c06b8c979f920ba2086 Mon Sep 17 00:00:00 2001 From: Manuel Bellersen Date: Mon, 4 Mar 2024 22:19:26 +0100 Subject: [PATCH] &4 #34 adjusting path to requirements.txt in README, adjust dockerfile for usage with x86_64 and arm64 --- Dockerfile | 15 +++++++++++++-- README.md | 6 +++--- docker-compose.yml | 3 +++ requirements.txt | 3 +-- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ba0818..7117b34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM python:3.11.8 +ARG TARGETPLATFORM +FROM --platform=${TARGETPLATFORM} python:3.11.8 RUN useradd getml USER getml @@ -11,8 +12,18 @@ RUN python3.11 \ -mpip install \ -r /home/getml/requirements.txt +ARG TARGETOS +ARG TARGETARCH + +ENV GETML_VERSION 1.4.0 + RUN mkdir /home/getml/.getML /home/getml/.getML/logs /home/getml/.getML/projects /home/getml/demo -RUN curl https://storage.googleapis.com/static.getml.com/download/1.4.0/getml-1.4.0-x64-linux.tar.gz | tar -C /home/getml/.getML -xvzf - +RUN if [ "${TARGETARCH}" = "amd64" ]; then \ + export GETML_ARCH="x64"; \ + else \ + export GETML_ARCH="${TARGETARCH}"; \ + fi;\ + curl https://storage.googleapis.com/static.getml.com/download/${GETML_VERSION}/getml-${GETML_VERSION}-${GETML_ARCH}-${TARGETOS}.tar.gz | tar -C /home/getml/.getML -xvzf - EXPOSE 1709 8888 CMD [ "/home/getml/.local/bin/jupyter", "lab", "--ip='*'", "--port=8888", "--notebook-dir='/home/getml/demo'" ] \ No newline at end of file diff --git a/README.md b/README.md index 193c739..c81ff61 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ This repository contains different [Jupyter Notebooks](https://jupyter.org/) to * [Reading Online](#reading-online) * [Experimenting Locally](#experimenting-locally) * [Using Docker or Podman](#using-docker-or-podman) - * [On the Machine (Linux/x64)](#on-the-machine-linuxx64) + * [On the Machine (Linux/x64 & arm64)](#on-the-machine-linuxx64--arm64) * [Notebooks](#notebooks) * [Overview](#overview) * [Descriptions](#descriptions) @@ -79,7 +79,7 @@ After the first `getml.engine.launch(...)` is executed and the engine is started http://localhost:1709/#/token/token ``` -### On the Machine (Linux/x64) +### On the Machine (Linux/x64 & arm64) Alternatively, getML and the notebooks can be run natively on the local Linux machine by having certain software installed, like Python and some Python libraries, Jupyter-Lab and the getML engine. The [getML Python library](https://github.com/getml/getml-community/) provides an engine version without [enterprise features](https://www.getml.com/pricing). But as those features are shown in the demonstration notebooks, the [trail of the enterprise version](https://www.getml.com/download) can be used for those cases. @@ -91,7 +91,7 @@ $ cd getml-demo $ pipx install hatch $ hatch env create $ hatch shell -$ pip install -r requirements/requirements.3.11.txt +$ pip install -r requirements.txt $ jupyter-lab ``` diff --git a/docker-compose.yml b/docker-compose.yml index cc5621e..cd16d2b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,9 @@ services: build: context: ./ dockerfile: Dockerfile + platforms: + - "linux/amd64" + - "linux/arm64" networks: - notebooks_network ports: diff --git a/requirements.txt b/requirements.txt index 70f8c4b..1e3f39f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,5 +7,4 @@ seaborn==0.13.2 ipywidgets==8.1.2 plotly==5.18.0 prophet==1.1.5 -matplotlib==3.8.2 -pystan==3.9.0 \ No newline at end of file +matplotlib==3.8.2 \ No newline at end of file