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.
- Author: Dominick Dimpfel
- Professor: Andrew Stewart
- 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.
-
Install VSCode
-
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.
-
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
-
Open the VSCode command pallette:
- Ctrl/Cmd+Shift+P or click on the top bar in VSCode and type '>'
-
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.
-
Confirm your Conda environment is setup:
- Run the test.ipynb file to confirm the dependency versions.
- 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:
- Open a new terminal in the container's VSCode window by going to Terminal > New Terminal in the titlebar (this should open bash).
- You should see an '*' next to the en685648 environment.
- Run the test.ipynb file to confirm the dependency versions.
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
.
- To start it everytime on bootup,
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.
- make workspace environment name variable (en685648)
- setup vscode extensions file and install script for container