mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-26 21:09:44 +01:00
Simplify stack --docker commands by specifying the image in stack.yaml
This commit is contained in:
parent
b5e3a98870
commit
ded944f06b
2 changed files with 11 additions and 5 deletions
12
README.md
12
README.md
|
@ -72,18 +72,17 @@ working, the following commands will compile and run the tests.
|
||||||
```
|
```
|
||||||
git clone --recursive https://github.com/tensorflow/haskell.git tensorflow-haskell
|
git clone --recursive https://github.com/tensorflow/haskell.git tensorflow-haskell
|
||||||
cd tensorflow-haskell
|
cd tensorflow-haskell
|
||||||
IMAGE_NAME=tensorflow/haskell:2.3.0
|
docker build -t tensorflow/haskell:2.3.0 docker
|
||||||
docker build -t $IMAGE_NAME docker
|
|
||||||
# TODO: move the setup step to the docker script.
|
# TODO: move the setup step to the docker script.
|
||||||
stack --docker --docker-image=$IMAGE_NAME setup
|
stack --docker setup
|
||||||
stack --docker --docker-image=$IMAGE_NAME test
|
stack --docker test
|
||||||
```
|
```
|
||||||
|
|
||||||
There is also a demo application:
|
There is also a demo application:
|
||||||
|
|
||||||
```
|
```
|
||||||
cd tensorflow-mnist
|
cd tensorflow-mnist
|
||||||
stack --docker --docker-image=$IMAGE_NAME build --exec Main
|
stack --docker build --exec Main
|
||||||
```
|
```
|
||||||
|
|
||||||
### Stack + Docker + GPU
|
### Stack + Docker + GPU
|
||||||
|
@ -93,6 +92,9 @@ If you want to use GPU you can do:
|
||||||
```
|
```
|
||||||
IMAGE_NAME=tensorflow/haskell:2.3.0-gpu
|
IMAGE_NAME=tensorflow/haskell:2.3.0-gpu
|
||||||
docker build -t $IMAGE_NAME docker/gpu
|
docker build -t $IMAGE_NAME docker/gpu
|
||||||
|
# TODO: move the setup step to the docker script.
|
||||||
|
stack --docker --docker-image=$IMAGE_NAME setup
|
||||||
|
stack --docker --docker-image=$IMAGE_NAME test
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using nvidia-docker version 2
|
### Using nvidia-docker version 2
|
||||||
|
|
|
@ -25,6 +25,10 @@ extra-lib-dirs:
|
||||||
extra-include-dirs:
|
extra-include-dirs:
|
||||||
- /usr/local/include
|
- /usr/local/include
|
||||||
|
|
||||||
|
docker:
|
||||||
|
enable: false
|
||||||
|
image: tensorflow/haskell:2.3.0
|
||||||
|
|
||||||
nix:
|
nix:
|
||||||
enable: false
|
enable: false
|
||||||
# nixos-21.05 with libtensorflow 2.3.0
|
# nixos-21.05 with libtensorflow 2.3.0
|
||||||
|
|
Loading…
Reference in a new issue