Skip to content

Simple containerized python development environment for datascience explorations. Numpy, Pandas and Matplotlib are installed by default

License

Notifications You must be signed in to change notification settings

vsanavia/portable-python

Repository files navigation

GitHub GitHub last commit GitHub followers Medium vsanavia Twitter Follow ci portable-python icon

portable-python

Containerized python development environment (or poor man's codespaces ;)). The default configuration is intended to be used as a datascience focused environment and has the following components:

  1. Based on the official Python 3.9.14 slim bullseye image.

  2. Python runs on a virtual environment created with the venv utility.

  3. NumPy v. 1.23.3, pandas v. 1.5.1 and matplotlib v. 3.6.0 python modules are preinstalled by default.

  4. Jupyterlab v. 3.4.8 is preinstalled and run by the entrypoint.sh script.

  5. code-server to allow running [VS Code] on your browser from any machine

Instructions

On a machine with docker (tested with docker desktop), clone the portable python git repository:

git clone https://github.com/vsanavia/portable-python.git

Enter the portable-python directory:

cd portable-python

Docker build your development environment:

docker build -t vsanavia/portable-python .

Run your containerized development environment on the background (detached mode) exposing ports 9090 (VS code web) and 8787 (Jupyter notebook)

docker run -d -p 9090:9090 -p 8787:8787 --name popy-container vsanavia/portable-python

VS Code will be available at http://localhost:9090 (without encryption as the self signed SSL certificate creates issues with extensions installations) and Jupyter notebook at https://localhost:8787 with a self signed SSL certificate.

To access VS Code from a remote machine, you can point your browser (tested from Chrome, Firefox and Safari on Mac) to http://localhost:9090.

To access Jupyter Lab from a remote machine, you can point your browser (tested from Chrome, Firefox and Safari on Mac) to https://localhost:8787/notebook/lab. You will receive a warning about an untrusted certificate on the first visit.

Choose the available kernel on the virtual environment (.venv) (shown on the VS Code web interface and start coding.

Choosing kernel

About

Simple containerized python development environment for datascience explorations. Numpy, Pandas and Matplotlib are installed by default

Topics

Resources

License

Stars

Watchers

Forks