Comments (6)
Hi @ludiusvox ,
- Glad to see this issue is resolved. Please feel free to close the issue if it is resolved ?
Thank you!
from tensorflow.
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.
Hi @ludiusvox ,
- Could you please upgrade your tensorflow version. And here there is version miss match also. Please go through this documentation once.
Thank you!
from tensorflow.
Thank you!
from tensorflow.
I found a solution with an IDE 1 line of code. Very useful
one line of code
Found the solutions.
https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html
For example, you can use an image quay.io/jupyter/pytorch-notebook:cuda12-python-3.11.8 or quay.io/jupyter/tensorflow-notebook:cuda-latest
sudo podman pull quay.io/jupyter/tensorflow-notebook:cuda-latest
very fast shortcut
one line of code fixed the problem
from tensorflow.
Are you satisfied with the resolution of your issue?
Yes
No
from tensorflow.
Related Issues (20)
- Tensorflow can't detect my GPU
- Regarding lstm's full integer quantisation, does it quantise its intermediate output? The lstm full integer quantisation I get has only one input and one output quantisation parameter (minus the arguments)
- Convergence of Actor critic algorthim HOT 1
- Web HOT 2
- Failure building wheel for v2.16.1 from scratch: cannot stat cudnn_backend_base.h HOT 1
- adding type annotations in TensorFlow HOT 1
- Memory leak in training HOT 2
- Aborted (core dumped) in `tf.io.TFRecordOptions`
- Issue with Loading libdelegate.so on Ubuntu 22.04 LTS Using TensorFlow Lite GPU Delegate HOT 2
- "Skipping the delay kernel" warning emitted thousands of times. HOT 1
- Issue with softmax warning appearing in Tensorflow 2.17.0 HOT 2
- Converting model for on-device training fails with "LLVM ERROR: Failed to infer result type(s)." HOT 1
- Aborted (core dumped) in `tf.config.threading.set_intra_op_parallelism_threads` HOT 1
- Segmentation fault (core dumped) in `tf.config.threading.set_inter_op_parallelism_threads`
- Can tflite model maker be used to train MobileNet models?
- Can the TensorFlow Android object detection example support MobileNetV2 and MobileNetV3 tflite models?
- ImportError: DLL load failed while importing _pywrap_tensorflow_internal: Error en una rutina de inicialización de biblioteca de vínculos dinámicos (DLL). HOT 4
- Conv2D is no longer supporting Masking in TF v2.17.0 HOT 5
- AttributeError: 'Sequential' object has no attribute '_get_save_spec'
- How to build python .whl on cmake with flex delegate support?
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.