-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adjusting README and Dockerfile for x86_64 and arm64 usage (#22)
* &4 #34 adjusting path to requirements.txt in README, adjust dockerfile for usage with x86_64 and arm64 * dodgers: fix prophet usage * Adjusting Dockerfile and docker-compose.yml to actually work with Docker, simplify by removing multiarch parts. Using heredoc for multiline RUN * Adjusting Dockerfile and compose to work with Docker-Desktop; add hint in README for better bind-mount use with alternatives * Adjusting README, shortening Podman part * renaming GETML_VERSION_NUMBER to GETML_VERSION; using multi-stages to have ARCH specific arguments * Using RUN script instead of multiple stages because of buildah problem with composed stage name resultion (containers/buildah#4820) * Tiny improvement on getml version grep
- Loading branch information
Showing
5 changed files
with
83 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,42 @@ | ||
FROM python:3.11.8 | ||
################################################################################ | ||
# getml-base | ||
FROM python:3.11.8 AS getml-base | ||
|
||
RUN useradd getml | ||
USER getml | ||
WORKDIR /home/getml | ||
|
||
COPY --chown=getml:getml --chmod=0777 ./requirements.txt /home/getml/requirements.txt | ||
|
||
ENV PATH="$PATH:/home/getml/.local/bin" | ||
ENV PATH="/home/getml/.local/bin:$PATH" | ||
|
||
RUN python3.11 \ | ||
-mpip install \ | ||
-r /home/getml/requirements.txt | ||
|
||
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 mkdir /home/getml/.getML | ||
|
||
|
||
################################################################################ | ||
# getml-demo | ||
FROM getml-base AS getml-demo | ||
|
||
ARG TARGETARCH | ||
ARG TARGETOS | ||
RUN \ | ||
if [ "${TARGETARCH}" = "amd64" ]; then \ | ||
export GETML_ARCH="x64" ;\ | ||
else \ | ||
export GETML_ARCH="${TARGETARCH}" ;\ | ||
fi; \ | ||
export GETML_VERSION=$(grep -o "^getml==.*$" requirements.txt | cut -b8-) ;\ | ||
export GETML_BUCKET="https://storage.googleapis.com/static.getml.com/download" ;\ | ||
export GETML_ENGINE_FILE="getml-${GETML_VERSION}-${GETML_ARCH}-${TARGETOS}.tar.gz" ;\ | ||
export GETML_ENGINE_URL="${GETML_BUCKET}/${GETML_VERSION}/${GETML_ENGINE_FILE}" ;\ | ||
echo "Downloading getML engine from ${GETML_ENGINE_URL}" ;\ | ||
curl ${GETML_ENGINE_URL} | tar -C /home/getml/.getML -xvzf - | ||
|
||
COPY --chown=getml:getml . /home/getml/demo/ | ||
|
||
EXPOSE 1709 8888 | ||
CMD [ "/home/getml/.local/bin/jupyter", "lab", "--ip='*'", "--port=8888", "--notebook-dir='/home/getml/demo'" ] | ||
CMD [ "/home/getml/.local/bin/jupyter", "lab", "--ip='*'", "--port=8888", "--notebook-dir='/home/getml/demo'" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |