Reference build environment for deeplearning4j
1.0K
The devkit provides an interactive shell to build nd4j and deeplearning4j. The shell is packaged as a docker image.
The following command will:
docker run -it -v `pwd`:/workspace -w /workspace deeplearning4j/dl4j-devkit bash
$ git clone https://github.com/deeplearning4j/deeplearning4j.git
$ cd deeplearning4j
$ ./setup.sh
Mac OSX:
brew install boot2docker
pip install docker-compose
To simplify launching the shell, author a docker-compose file into your workspace directory. Your workspace directory should contain the nd4j, deeplearning4j, and other such repositories.
Write to ./docker-compose.yml the following snippet:
shell:
image: deeplearning4j/dl4j-devkit:latest
volumes:
- .:/workspace
- $HOME/.m2:/home/vagrant/.m2
working_dir: /workspace
environment:
- CONTAINER_NAME=shell
command: bash
$ docker-compose run --rm shell
A bash shell starts up into the workspace directory that is shared into the container at /workspace.
[vagrant@abd582a75122#shell workspace]$ pwd
/workspace
[vagrant@abd582a75122#shell workspace]$ ls
Canova deeplearning4j dl4j-spark-ml nd4j
Build projects at will:
[vagrant@abd582a75122#shell workspace]$ cd nd4j
[vagrant@abd582a75122#shell nd4j]$ mvn install -DskipTests
...
[INFO] BUILD SUCCESS
...
[vagrant@abd582a75122#shell nd4j]$
Exit the shell when finished:
[vagrant@abd582a75122#shell workspace]$ exit
Content type
Image
Digest
sha256:2fbb7c0d5…
Size
274.2 MB
Last updated
about 11 years ago
docker pull deeplearning4j/dl4j-devkit