Sign inSign up

automaatio/jupyterlab

By automaatio

•Updated 5 months ago

JupyterLab image with additional Python packages (e.g. Pandas, BeautifulSoup 4, Mutagen)

Image
Data science
0

10K+

automaatio/jupyterlab repository overview

⁠Overview

This image is based on the a Python 3.12 image. The Dockerfile PIP installs Juyper, JupyerLab, and Jupyter Scheduler along with several common data science modules. It comes with the theme jupyterlab-horizon-theme.

 

⁠Dockerfile

################################################################
### Base Image
################################################################

# Install Python 3.12.4 based on 
# Debian 12 Bookworm
FROM python:3.12.4-bookworm


################################################################
### Packages
################################################################

# Working directory `/tmp`
WORKDIR /tmp

# Copy `requirements.txt` into image
COPY requirements.txt ./

# Run package updates
RUN apt update && apt install -y

# Install `Nano` & `Cron`
RUN apt install nano -y

# Upgrade PIP
RUN pip install --upgrade pip

# Install packages from `requirements.txt`
RUN pip install -r requirements.txt

# Clean up `requirements.txt` file
RUN rm requirements.txt


################################################################
###  JupyterLab
################################################################

# Working directory to `/home/jovyan`
WORKDIR /home/jovyan

# Expose port 8888
EXPOSE 8888

# Entrypoint for container
ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--allow-root"]
 

⁠Requirements

################################################
# JupyterLab
################################################

jupyter_scheduler
jupyter==1.0.0
jupyterlab==4.2.3


################################################
# JupyterLab Theme
################################################

jupyterlab-horizon-theme==4.0.1    # Blue highlights
# jupyterlab-horizon-theme==4.0.2  # Pink highlights


################################################
# Python Packages
################################################

sqlalchemy
pymysql
mutagen
pydub
beautifulsoup4
requests
pandas
html5lib
lxml
humanize
 

⁠Docker Compose

# Docker-Compose Version
version: "3.8"

################################################
# Services
################################################

services:

  ################################################
  # JupyterLab
  ################################################

  jupyterlab:
    image: "automaatio/jupyterlab:4.2.3"
    container_name: "jupyterlab"
    restart: "unless-stopped"
    environment:
      TZ: ${TZ}
    ports:
      - "8888:8888"
    volumes:
      - "/home/docker/jupyterlab/notebooks:/home/jovyan:rw"     # Where notebooks are stored
      - "/home/docker/jupyterlab/config:/root/.jupyter:rw"      # Jupyterlab configurations
 

⁠Installation

  • Once the container is running, check the logs for a token:
To access the server, open this file in a browser:
    file:///home/jovyan/.local/share/jupyter/runtime/jpserver-7-open.html
Or copy and paste one of these URLs:
    http://902u3489u:8888/lab?token=598aea54f916n89wnio10949XXXX78496fd07b557179422
    or http://127.0.0.1:8888/lab?token=598aea54f916n89wnio10949XXXX78496fd07b557179422
  • Copy the token and paste it into the JupyterLab local address

Access application at: http://<LOCAL_ADDRESS>:8888

Tag summary

Content type

Image

Digest

sha256:5ee22ecad…

Size

602.6 MB

Last updated

5 months ago

docker pull automaatio/jupyterlab