Kathryn Schuler

How to analyze data with the jupyter/datascience-notebook

Prereqs

You’ll need to install docker on your machine. If you want to borrow our docker-compose.yml file, you can copy from this repository, or clone it using

git clone https://github.com/pennchildlanglab/docker-compose-demo.git

Docker compose

You’ll need a docker-compose.yml file that specifies the image you want to use, the password, the volume to map to, and the port you want to open on

version: "3.7"
services: 
  datascience-demo:
    image: jupyter/datascience-notebook:r-4.0.3
    environment: 
      - JUPYTER_TOKEN=hi
    volumes:
      - ./:/home/jovyan/work
    ports: 
      - 8888:8888
    container_name: datascience-demo

To bring up the container, navigate to the folder that contains the docker-compose.yml file and use

docker-compose up -d --build

To bring it down, use

docker-compose down