Skip to content

Instantly share code, notes, and snippets.

@gustavofonseca
Forked from rafaelnovello/Dockerfile Jupyter
Created June 15, 2021 18:43
Show Gist options
  • Save gustavofonseca/d66bf774326c231a3f63e53b15c5ee01 to your computer and use it in GitHub Desktop.
Save gustavofonseca/d66bf774326c231a3f63e53b15c5ee01 to your computer and use it in GitHub Desktop.
# reference: https://hub.docker.com/_/ubuntu/
FROM python:3.8-slim-buster
# Adds metadata to the image as a key value pair example LABEL version="1.0"
LABEL maintainer="Rafael Novello <rafa.reis.novello@gmail.com>"
# Set environment variables
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
# Create empty directory to attach volume
RUN mkdir ~/prjs
# Install Ubuntu packages
RUN apt-get update && apt-get install -y \
wget \
bzip2 \
ca-certificates \
build-essential \
curl \
git \
htop \
vim \
pkg-config \
unzip \
python-pip && \
# Clean up
apt-get clean && rm -rf /var/lib/apt/lists/* && \
# Update pip
pip install -U pip && \
# Install data science libs
pip install jupyterlab \
pandas \
scikit-learn \
matplotlib \
seaborn \
imbalanced-learn \
# Configure access to Jupyter
WORKDIR /root/prjs
EXPOSE 8888
EXPOSE 8000
CMD jupyter lab --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token='data-science'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment