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

Try to install latest TensorFlow version using mamba #2192

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions images/tensorflow-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ RUN mamba install --yes \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

# Install tensorflow with pip, on x86_64 tensorflow-cpu
RUN [[ $(uname -m) = x86_64 ]] && TF_POSTFIX="-cpu" || TF_POSTFIX="" && \
pip install --no-cache-dir \
"tensorflow${TF_POSTFIX}" && \
# Can't use `conda-forge` for aarch64 tensorflow:
# https://github.com/conda-forge/tensorflow-feedstock/issues/136
RUN if [ "$(uname -m)" = "x86_64" ]; then \
mamba install --yes \
'tensorflow-cpu' && \
mamba clean --all -f -y ; \
else \
pip install --no-cache-dir \
'tensorflow'; \
fi && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

Expand Down
9 changes: 6 additions & 3 deletions images/tensorflow-notebook/cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ RUN mamba install --yes \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

# Install TensorFlow, CUDA and cuDNN with pip
RUN pip install --no-cache-dir \
"tensorflow[and-cuda]<=2.17.1" && \
# Install TensorFlow, CUDA and cuDNN
# Specifying `CONDA_OVERRIDE_CUDA` to use gpu version on a machine with cpu only:
# https://github.com/conda-forge/tensorflow-feedstock/issues/174
RUN CONDA_OVERRIDE_CUDA=12.6 mamba install --yes \
'tensorflow-gpu' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

Expand Down
2 changes: 2 additions & 0 deletions tests/by_image/docker-stacks-foundation/test_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"pytables": "tables",
"scikit-image": "skimage",
"scikit-learn": "sklearn",
"tensorflow-cpu": "tensorflow",
"tensorflow-gpu": "tensorflow",
# R
"randomforest": "randomForest",
"rcurl": "RCurl",
Expand Down
Loading