Skip to content

ddimpfel/data-science-anaconda-ubuntu-dev-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Science Anaconda-Ubuntu Dev Container

Intro

This repo is used to setup an Anaconda working environment, with VSCode Dev Containers, for the Johns Hopkins University Data Science course (en685648).

Created during the Fall 2025 semester.

POCs

  • Author: Dominick Dimpfel
  • Professor: Andrew Stewart

Benefits to using

  • It runs on any machine as an Ubuntu Linux OS with UNIX commands.
  • All dependencies are handled by the dev container, so any results you create should be runnable by anyone else with the container.
  • Mounted to your local working directory so changes saved in container are replicated on your machine.

Setup

  1. Install VSCode

  2. Locally install the Dev Containers VSCode extension.

    • In VSCode, on the left toolbar, click the extensions icon (the 3 boxes and 1 diamond icon).
    • It is authored by Microsoft, click install.
  3. Pull this repository to your local development folder for this course.

    • Open a shell/command prompt then run the following commands
    cd /path/to/your/workspace
    
    git clone https://github.com/ddimpfel/data-science-anaconda-ubuntu-dev-container.git
  4. Open the VSCode command pallette:

    • Ctrl/Cmd+Shift+P or click on the top bar in VSCode and type '>'
  5. Run the 'Dev Containers: Reopen in Container' command.

    • This will take up to 5 minutes to build the image at first.
    • You can open the logs (bottom right popup) to see what stage it is on or to debug any errors.

    NOTE: You should only build the image one time, make sure to use the 'Reopen in Container' command to avoid rebuilding the image.

  6. Confirm your Conda environment is setup:

    • Run the test.ipynb file to confirm the dependency versions.
      1. You may need to set the Python kernel, use the Jupyter kernel.
    • Run 'conda env list' to check you are using the correct Conda environment:
      1. Open a new terminal in the container's VSCode window by going to Terminal > New Terminal in the titlebar (this should open bash).
      2. You should see an '*' next to the en685648 environment.

Using the Container

You must start the Docker Daemon first to use Dev Containers.

  • For Windows/MacOS, install the Docker Desktop app and simply run it to begin.
  • For Linux, sudo systemctl start docker to start the Daemon.
    • To start it everytime on bootup, sudo systemctl enable docker.

You should now have a built container for all course development. When you'd like to reopen the dev container, simply open your local workspace in VSCode and rerun the 'Dev Containers: Reopen in Container' command.

To stop the container, you can simply close VSCode or run 'Dev Containers: Close Remote Connection'.

My folder structure is setup so all modules can utilize the single dev container:

Data_Science/
├── .devcontainer/
│   ├── devcontainer.json
│   ├── Dockerfile
│   └──environment.yml
├── m1/
│   ├── module1_discussion.docx
│   └── lab1.docx
├── m2/
|   ├── data/...
│   ├── module2_discussion.docx
│   └── lab2.ipynb
├── .gitignore
├── README.md

Recommended: Install Docker Desktop to view and manage the container.

TODO

  • make workspace environment name variable (en685648)
  • setup vscode extensions file and install script for container

About

Anaconda Ubuntu Dev Container setup for JHU Data Science course.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published