- docker
- docker-compose
-
create a folder for yours datasets:
mkdir ~/datasets mkdir ~/scripts
-
open the terminal on the docker folder (where Dockerfile is placed)
-
build with command (it can take a lot of time):
docker build --no-cache=true -t ml-image .
-
open the terminal on the docker folder (were docker-compose is placed)
-
run the container with the command:
docker-compose up
-
open Jupiter on browser (psw: ml):
localhost:8888
docker exec -it [container-id] bash
scripts folder
cd ../scripts
-
If you need to use tensorboard run :
docker exec -it machine_learning_tf tensorboard --logdir tf_logs/
-
open it on browser (URL):
localhost:6006
- see all the images:
docker images -a
- when you modify the Dockerfile is good to clean the dangling images:
docker images --filter "dangling=true" docker rmi $(docker images -q --filter "dangling=true")
docker build --no-cache=true -t ml-image-gpu -f Dockerfile.gpu .
docker-compose -f docker-compose.yml up
nvidia-docker run \
--rm \
--device /dev/nvidia0:/dev/nvidia0 \
--device /dev/nvidiactl:/dev/nvidiactl \
--device /dev/nvidia-uvm:/dev/nvidia-uvm \
-p 8888:8888 \
-v ~/ML_fileLocali/notebooks:/notebooks/samples \
-v ~/ML_fileLocali/datasets:/datasets \
-v ~/machine_learning/notebooks:/notebooks \
-v ~/machine_learning/scripts:/scripts \
ml-final-8-6