Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
Add easy start.sh script for building and starting the docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoop57 committed Dec 7, 2020
1 parent 2db53a0 commit 82ae9ac
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /bin/sh

DATA=$1
PORT=$2
TAG=mlproj

if [ $# -eq 3 ]; then
if [ "$3" = "--build" ]; then
# Build the docker container
docker build -t $TAG .build
fi
fi


# Run the docker container. Add additional -v if
# you need to mount more volumes into the container
# Also, make sure to edit the ports to fix your needs.
docker run -d --gpus all -it -p $PORT:8888 -v $(pwd):/home/jovyan/work \
-v $DATA:/home/jovyan/data -e GRANT_SUDO=yes -e JUPYTER_ENABLE_LAB=yes \
--restart always --name $TAG $TAG

0 comments on commit 82ae9ac

Please sign in to comment.