1
0
mirror of https://github.com/tiyn/dockerfiles.git synced 2026-01-03 06:59:46 +01:00
Files
dockerfiles/tf-nightly-gpu-venv
2025-12-24 01:25:07 +01:00
..
2025-12-24 01:25:07 +01:00
2025-12-24 01:25:07 +01:00
2025-12-24 01:25:07 +01:00

TensorFlow Nightly GPU VENV

This is a dockerized version of a TensorFlow virtual environment setup that works with a GPU. This container and its documentation was made by tiyn it is based on the official TensorFlow image.

Setup

Navigate into the src directory and build the image using the following command.

docker build . -t tf-nightly-gpu-venv

Then create a rebuild.sh file. Change the settings according to your needs and run ./rebuild.sh afterward.

Environment-variables

Set the following variables with the -e tag.

Name Usage Default
VIRTUAL_ENV Specifies the path to the virtual environment /opt/venv

Volumes

Set the following volumes with the -v tag.

Outside mount/volume name Container mount Description
$(pwd) /workspace/src directory containing the source files

rebuild.sh

docker stop tf-nightly-gpu-venv
docker rm tf-nightly-gpu-venv
docker run --name tf-nightly-gpu-venv --rm --gpus all -it -v "$(pwd):/workspace/src" -w /workspace/src -d tf-nightly-gpu-venv