- python3.10
- R
- Spark
- QGIS
-
Download docker and install it (https://www.docker.com/get-started).
-
Start docker using
systemctl start docker.service
in Linux; orsudo service docker start
in WSL2 linux-sub-system in Windows; or double click docker icons to make sure it open in Windows/MacOS. -
RUN
docker build -t [your_image_name]:[version] https://raw.githubusercontent.com/HiCiChlid/geosci-pyenv/main/dockerfile
-
Wait for it to finish.
-
Download docker and install it (https://www.docker.com/get-started).
-
Start docker using
systemctl start docker.service
in Linux; orsudo service docker start
in WSL2 linux-sub-system in Windows; or double click docker icons to make sure it open in Windows/MacOS. -
Download dockerfile (https://github.com/HiCiChlid/geosci-pyenv/blob/main/dockerfile) to the specified location.
-
Open Terminal or CMD, and locate to the specified location using
cd
(in Windows for switching to another volume, you can directly input the volume mark in the CMD, e.g.,D:
). -
Run
docker build -t [your_image_name]:[version] [dockerfile location]
, e.g.,docker build -t test:v1 .
-
Wait for it to finish.
-
Open Terminal and make sure docker is open.
-
Run
docker run -v [connected_path_in_your_computer]:/home/current -id --name=[container_name] -p 8888:8888 -p 4040:4040 --shm-size 2g [your_image_name]:[version]
Note that: in windows,
[connected_path_in_your_computer]
is in the format of/mnt/d/"path with space/next layer/next layer"
-
In windows, if you hope to exploit your Nvidia GUP in docker, you can download and install the driver first (https://developer.nvidia.com/cuda/wsl/download), and then run
docker run -v [connected_path_in_your_computer]:/home/current -id --name=[container_name] -p 8888:8888 -p 4040:4040 --shm-size 2g --gpus all [your_image_name]:[version]
-
After container building, you can start your container through
docker exec -it [container_name] /bin/bash
-
you can use
sh jp.sh
to start Jupyter notebook.
- Download VScode(https://code.visualstudio.com/download) and install it.
- Search Remote - Containers, Remote - WSL, Docker from Extension Marketplace.
- Click the Docker icon and start your container
- Click the green bar in the bottom
and choose Attach to running container
and then choose the container with python3, and a new window will open.
- In new the new window, click the extension
to search Python and install it. You can enjoy debuging your .py scripts. :)