-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cuda12 variant of tensorflow-notebook (#2100)
* Add cuda12 variant for tensorflow-notebook * Reduce size of CPU version of tensorflow-notebook * Try to fix tests * Update docs/using/selecting.md Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com> * Update images/tensorflow-notebook/cuda12/Dockerfile Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com> * Update tests/docker-stacks-foundation/test_packages.py Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com> * Remove obsolete XLA_FLAGS env var * Install CUDA and cuDNN using pip instead of mamba * Fix pre-commit shell checks * Change tensorflow variant name from cuda12 to cuda * Update selecting.md * Update selecting.md --------- Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
- Loading branch information
1 parent
dd06b93
commit b9553a8
Showing
6 changed files
with
61 additions
and
7 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
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
ARG REGISTRY=quay.io | ||
ARG OWNER=jupyter | ||
ARG BASE_CONTAINER=$REGISTRY/$OWNER/scipy-notebook | ||
FROM $BASE_CONTAINER | ||
|
||
LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>" | ||
|
||
# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 | ||
# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
# Install TensorFlow, CUDA and cuDNN with pip | ||
RUN pip install --no-cache-dir "tensorflow[and-cuda]" && \ | ||
fix-permissions "${CONDA_DIR}" && \ | ||
fix-permissions "/home/${NB_USER}" | ||
|
||
# workaround for https://github.com/tensorflow/tensorflow/issues/63362 | ||
RUN mkdir -p "${CONDA_DIR}/etc/conda/activate.d/" && \ | ||
fix-permissions "${CONDA_DIR}" | ||
|
||
COPY --chown="${NB_UID}:${NB_GID}" nvidia-lib-dirs.sh "${CONDA_DIR}/etc/conda/activate.d/" | ||
|
||
# https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.html#dockerfiles | ||
ENV NVIDIA_VISIBLE_DEVICES="all" \ | ||
NVIDIA_DRIVER_CAPABILITIES="compute,utility" |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
|
||
# This adds the NVIDIA libraries to the LD_LIBRARY_PATH. Workaround for | ||
# https://github.com/tensorflow/tensorflow/issues/63362 | ||
NVIDIA_DIR=$(dirname "$(python -c 'import nvidia;print(nvidia.__file__)')") | ||
LD_LIBRARY_PATH=$(echo "${NVIDIA_DIR}"/*/lib/ | sed -r 's/\s+/:/g')${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | ||
export LD_LIBRARY_PATH |
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