Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjusting README and Dockerfile for x86_64 and arm64 usage #22

Merged
merged 8 commits into from
Apr 22, 2024
15 changes: 13 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3.11.8
ARG TARGETPLATFORM
Urfoex marked this conversation as resolved.
Show resolved Hide resolved
FROM --platform=${TARGETPLATFORM} python:3.11.8

RUN useradd getml
USER getml
Expand All @@ -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 \
Urfoex marked this conversation as resolved.
Show resolved Hide resolved
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'" ]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Urfoex marked this conversation as resolved.
Show resolved Hide resolved
* [Notebooks](#notebooks)
* [Overview](#overview)
* [Descriptions](#descriptions)
Expand Down Expand Up @@ -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.

Expand All @@ -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
```

Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ services:
build:
context: ./
dockerfile: Dockerfile
platforms:
- "linux/amd64"
- "linux/arm64"
networks:
- notebooks_network
ports:
Expand Down
65 changes: 36 additions & 29 deletions dodgers.ipynb

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
matplotlib==3.8.2