Install latest tensorflow using pip (#2263)

* Install latest tensorflow using pip

* Allow tensorflow test to warn

* Fix another way
This commit is contained in:
Ayaz Salikhov
2025-04-13 12:11:40 +01:00
committed by GitHub
parent bd347e0cb2
commit 90224a7a99
2 changed files with 8 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ RUN mamba install --yes \
# Install TensorFlow, CUDA and cuDNN with pip # Install TensorFlow, CUDA and cuDNN with pip
RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir \
"tensorflow[and-cuda]<=2.17.1" && \ 'tensorflow[and-cuda]' && \
fix-permissions "${CONDA_DIR}" && \ fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}" fix-permissions "/home/${NB_USER}"

View File

@@ -1,5 +1,12 @@
# Copyright (c) Jupyter Development Team. # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License. # Distributed under the terms of the Modified BSD License.
import os
import sys
if "NVIDIA_VISIBLE_DEVICES" in os.environ:
print("Not running this test in GPU mode")
sys.exit(0)
import tensorflow as tf import tensorflow as tf
print(tf.constant("Hello, TensorFlow")) print(tf.constant("Hello, TensorFlow"))