This commit is contained in:
Christoph Schranz 2019-11-14 12:58:06 +01:00
commit 81d319c061
2 changed files with 46 additions and 3 deletions

View File

@ -1,2 +1,45 @@
# gpu-jupyter # gpu-jupyter
Leverage the power of Jupyter through your NVIDEA GPU and use Tensorflow and Pytorch in collaborative notebooks. #### Leverage the power of Jupyter and use your NVIDEA GPU and use Tensorflow and Pytorch in collaborative notebooks.
![Jupyterlab Overview](/extra/jupyterlab-overview.png)
## Contents
1. [Requirements](#requirements)
2. [Quickstart](#quickstart)
3. [Deployment](#deployment-in-the-docker-swarm)
3. [Configuration](#configuration)
4. [Trouble-Shooting](#trouble-shooting)
## Requirements
1. Install [Docker](https://www.docker.com/community-edition#/download) version **1.10.0+**
2. Install [Docker Compose](https://docs.docker.com/compose/install/) version **1.6.0+**
3. Get access to use your GPU via the CUDA drivers, see this [blog-post](https://medium.com/@christoph.schranz)
4. Clone this repository
```bash
git clone https://github.com/iot-salzburg/gpu-jupyter.git
cd gpu-jupyter
```
## Quickstart
As soon as you have access to your GPU locally (it can be tested via a Tensorflow or PyTorch), you can run these commands to start the jupyter notebook via docker-compose:
```bash
./start-local.sh
```
This will run jupyter on the default port [localhost:8888](http://localhost:8888). The general usage is:
```bash
./start-local.sh -p [port] # port must be an integer with 4 or more digits.
```
In order to stop the local deployment, run:
```bash
./stop-local.sh
```
## Deployment in the Docker Swarm

View File

@ -12,7 +12,7 @@ esac; shift; done
# Check if arguments are valid # Check if arguments are valid
if [[ $PORT != [0-9][0-9][0-9][0-9]* ]]; then if [[ $PORT != [0-9][0-9][0-9][0-9]* ]]; then
echo "Given port is not valid." echo "Given port is not valid."
echo "Usage: $0 -p [port] -n [docker-network] # port must be an integer with 4 or more digits." echo "Usage: $0 -p [port] # port must be an integer with 4 or more digits."
exit 21 exit 21
fi fi
@ -23,5 +23,5 @@ export JUPYTER_PORT=$PORT
# echo $JUPYTER_PORT # echo $JUPYTER_PORT
docker-compose up --build -d docker-compose up --build -d
echo echo
echo "Started gpu-jupyter via docker-compose on port $JUPYTER_PORT." echo "Started gpu-jupyter via docker-compose on localhost:$JUPYTER_PORT."
echo "See docker-compose logs -f for logs." echo "See docker-compose logs -f for logs."