mirror of
https://github.com/tiyn/dockerfiles.git
synced 2026-01-08 17:19:45 +01:00
added tf-nightly-gpu-venv
This commit is contained in:
40
tf-nightly-gpu-venv/README.md
Normal file
40
tf-nightly-gpu-venv/README.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# 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](https://github.com/tiyn) it is based on the
|
||||
official [TensorFlow image](https://hub.docker.com/layers/tensorflow/tensorflow/nightly-gpu).
|
||||
|
||||
## Setup
|
||||
|
||||
Navigate into the `src` directory and build the image using the following command.
|
||||
|
||||
```sh
|
||||
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
|
||||
|
||||
```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
|
||||
```
|
||||
Reference in New Issue
Block a user