Comments (1)
I got it fixed with tensorflow nightly in docker containers, forget building from source!!!
this worked!!
Step-by-Step Instructions
Ensure Podman is Installed and Configured:
If Podman isn't installed or configured yet, follow these steps:
sh
sudo dnf install -y podman
Install NVIDIA Container Toolkit:
Install the NVIDIA Container Toolkit to enable GPU support in Podman.
sh
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | sudo tee /etc/yum.repos.d/nvidia-docker.repo
sudo dnf install -y nvidia-container-toolkit
sudo systemctl restart containerd
Configure Podman for NVIDIA Runtime:
Update Podman’s configuration to use the NVIDIA runtime.
sh
mkdir -p ~/.config/containers
cat < ~/.config/containers/containers.conf
[engine]
runtime = “nvidia”
EOT
Run TensorFlow Nightly GPU Container with Podman:
Use Podman on your host system to run the TensorFlow nightly GPU container. The --runtime=nvidia flag ensures that GPU support is enabled.
sh
podman run --runtime=nvidia -it tensorflow/tensorflow:nightly-gpu bash
If the above command fails or --runtime is not recognized, use the --gpus all flag:
sh
podman run --gpus all -it tensorflow/tensorflow:nightly-gpu bash
Verify TensorFlow GPU Support Inside the Container:
Once inside the container, verify that TensorFlow can access the GPU:
sh
python -c "import tensorflow as tf; print(‘TensorFlow version:’, tf.version); prin
2m
$ podman run --gpus all -it tensorflow/tensorflow:nightly-gpu bash
WARN[0000] Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. Set environment variable PODMAN_IGNORE_CGROUPSV1_WARNING to hide this warning.
___ /________________________________ / /______ __
__ / _ _ _ __ _ / __ _ / / __ / __ _ | /| / /
_ / / / / / /( )/ // / / _ _/ _ / / // / |/ |/ /
// /// //// _/// // // _//|/
WARNING: You are running this container as root, which can cause new files in
mounted volumes to be created as the root user on your host machine.
To avoid this, run the container by specifying your user’s userid:
$ docker run -u
/sbin/ldconfig.real: /usr/lib/wsl/drivers/nvmdsi.inf_amd64_23a2cede5f1383ec/libnvidia-ml.so.1 is not a symbolic link
root@b24205da9419:/# python -c “import tensorflow as tf; print(‘TensorFlow version:’, tf.version); print(‘Num GPUs Available:’, len(tf.config.experimental.list_physical_devices(‘GPU’)))”
2024-06-13 21:27:38.985917: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0.
2024-06-13 21:27:39.009506: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
TensorFlow version: 2.18.0-dev20240612
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1718314059.869098 17 cuda_executor.cc:990] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
I0000 00:00:1718314059.872207 17 cuda_executor.cc:990] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
I0000 00:00:1718314059.872254 17 cuda_executor.cc:990] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
Num GPUs Available: 1
from tensorflow.
Related Issues (20)
- Rescaling Layer Issue when Loading .keras Model
- Object Detection in Android using front camera: the detected bounding boxes are drawn incorrectly
- What is preventing TF to use GPU when used in native windows? HOT 12
- CMake Error: could not find requested file BuildFlatBuffers when cmake the lite kernel test
- CMake Error: could not find requested file BuildFlatBuffers when cmake the lite kernel test
- tf.py_function does not output ragged tensors HOT 2
- Aborted (core dumped) in `tf.raw_ops.CropAndResizeGradImage`
- Crash in `tf.raw_ops.UnsortedSegmentJoin/UnsortedSegmentMin/UnsortedSegmentMax/UnsortedSegmentProd/UnsortedSegmentSum` HOT 1
- error: no such file or directory: 'v2' when Bazel build for macOS HOT 4
- GCS gfile operations fail in TF nightly 2.17 and 2.18 when not running in GCP
- [Feature Request] Batch Renormalization HOT 1
- -
- Update curl from 8.4.0 to 8.6.0 due to security vulnerabilities CVE-2023-46219 and CVE-2023-46218
- Immediate Assistance Required: Issue with Converting Keras Model to TFLite
- Help Needed: AttributeError in tf2onnx Conversion from ONNX to TensorFlow Model HOT 1
- In tflite, how to use the same memory to serve different models with exactly the same structure HOT 2
- Too many duplicate debug logs
- Cannot take the length of shape with unknown rank. HOT 16
- Non-deprecated tf.keras.preprocessing alternatives don't cover properly all the deprecated features
- Some problems occur in the installation of TF-2.13.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow.