-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🏗️ create an advanced image for a given input python version
- Loading branch information
Borie, Niels
committed
Feb 8, 2024
1 parent
23eeba3
commit 32ff787
Showing
2 changed files
with
29 additions
and
23 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,15 +1,18 @@ | ||
# Copyright (c) Niels Borie. | ||
ARG PYTHON_VERSION | ||
ARG PYTHON_RELEASE_VERSION | ||
ARG IMAGE_VERSION | ||
|
||
FROM nielsborie/base-py39 | ||
FROM nielsborie/machine-learning-environments:base-py${PYTHON_VERSION}-${IMAGE_VERSION} | ||
|
||
LABEL maintainer="Niels BORIE" | ||
ARG PYTHON_VERSION | ||
ENV ENV_NAME=py${PYTHON_VERSION} | ||
|
||
# --- Install h2o | ||
RUN pip install -f http://h2o-release.s3.amazonaws.com/h2o/latest_stable_Py.html h2o | ||
|
||
# Create the environment: | ||
COPY environment.yml . | ||
RUN mamba env update --name py39 --file environment.yml --prune | ||
RUN mamba env update --name ${ENV_NAME} --file environment.yml --prune | ||
|
||
RUN . /opt/conda/etc/profile.d/conda.sh && \ | ||
conda activate ${ENV_NAME} && \ | ||
pip install -f http://h2o-release.s3.amazonaws.com/h2o/latest_stable_Py.html h2o && \ | ||
conda deactivate | ||
|
||
# clean up pip cache | ||
RUN rm -rf /root/.cache/pip/* | ||
RUN rm -rf /root/.cache/pip/* |
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