Sign inSign up

arannentriki/pystan_env

By arannentriki

•Updated over 2 years ago

Docker file for the Pystan library to be used easly with a Jupyter Notebook when using Windows.

Image
Integration & delivery
Machine learning & AI
1

251

arannentriki/pystan_env repository overview

⁠Quick Start Guide

To use directly this image follow the steps below after installing Docker Desktop on your computer :

⁠Pulling the Image

To use the image directly from Docker Hub, you first need to pull it. Run the following command to pull the image from Docker Hub:

docker pull arannentriki/pystan_env:latest
⁠Running the Container

Once the image is pulled, you can run a container using the following command:

docker run -d -p 2222:22 -p 8080:8080 -p 8888:8888 --name pystan_env arannentriki/pystan_env:latest

This command will start a container and map the necessary ports for SSH, VSCode, and Jupyter Notebook:

  • 2222 for SSH access
  • 8080 for VSCode (code-server) access
  • 8888 for Jupyter Notebook access
⁠Accessing Services
⁠SSH Access

To connect to the container via SSH, use the following command:

ssh root@localhost -p 2222

Use the password rootpassword.

⁠VSCode (code-server)

Open your browser and navigate to:

http://localhost:8080

You should see the VSCode (code-server) interface.

⁠Jupyter Notebook

Open your browser and navigate to:

http://localhost:8888

You should see the Jupyter Notebook interface.

⁠Overview

This Docker image is based on python:3.10.0-bullseye and is designed to provide a comprehensive development environment with the following features:

  • Python 3.10: A modern version of Python for all your scripting and development needs.
  • pystan: Pre-installed
  • SSH Access: Secure shell access is enabled, allowing you to connect remotely to the container.
  • VSCode (code-server): A web-based version of Visual Studio Code for a full-featured code editor accessible from your browser.
  • Jupyter Notebook: An interactive computing environment that enables you to create and share documents containing live code, equations, visualizations, and narrative text.
  • Pre-loaded Notebooks: Includes a Notesbook directory in the root user's home directory, allowing you to start with pre-defined Jupyter Notebooks.
⁠Features
  1. SSH Server:

    • Accessible on port 22.
    • Allows remote connection to the container.
    • Default root password: rootpassword (this should be changed for security purposes).
  2. VSCode (code-server):

    • Accessible on port 8080.
    • Provides a robust, web-based code editor with extensions support.
  3. Jupyter Notebook:

    • Accessible on port 8888.
    • No password or token required for easy access.
    • Ideal for data analysis, machine learning, and interactive coding.
  4. Pre-installed Python Packages:

    • pytan and other dependencies specified in requirements.txt are pre-installed.
  5. Pre-loaded Notebooks:

    • A Notesbook directory is copied to /root/Notesbook, ready for your use.
⁠Usage
  1. Building the Image:

    docker build -t python-pytan-ssh-vscode-jupyter .
    
  2. Running the Container:

    docker run -d -p 2222:22 -p 8080:8080 -p 8888:8888 --name dev-container python-pytan-ssh-vscode-jupyter
    
  3. Connecting via SSH:

    ssh root@localhost -p 2222
    
    • Use the password rootpassword.
  4. Accessing VSCode:

    • Open your browser and navigate to http://localhost:8080.
  5. Accessing Jupyter Notebook:

    • Open your browser and navigate to http://localhost:8888.
⁠Customization
  • Changing the Root Password:

    • For security, it is recommended to change the default root password by modifying the Dockerfile or changing it manually after connecting via SSH.
  • Adding Additional Python Packages:

    • Update the requirements.txt file to include any additional packages you need.
  • Pre-loading More Files:

    • Modify the Dockerfile to copy additional directories or files into the container as needed.

This Docker image is ideal for developers looking for a ready-to-use, flexible environment for using PyStan package when working on windows

⁠Github for building the Docker image

Link : https://github.com/Amine-RT/pystan_docker.git⁠

Tag summary

Content type

Image

Digest

sha256:443adfe59…

Size

717.3 MB

Last updated

over 2 years ago

docker pull arannentriki/pystan_env