Skip to content

Commit

Permalink
&4 #34 adjusting path to requirements.txt in README, adjust dockerfil…
Browse files Browse the repository at this point in the history
…e for usage with x86_64 and arm64
  • Loading branch information
Urfoex committed Mar 11, 2024
1 parent a3f9062 commit f1b9e78
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
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
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 \
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)
* [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
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

0 comments on commit f1b9e78

Please sign in to comment.