Skip to content

Tools to handle containers of the course Advanced Programming for Scientific Computing (aka PACS)

Notifications You must be signed in to change notification settings

pacs-course/PacsContainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Containers for the pacs course

This repository contains the tools to build and handle the container for the repository of the Advanced Programming for Scientific Computing course. It allows you to have a copy of the repositories pacs-examples and pacs-Labs. With the material of these repositories you will be able to follow the course and do the exercises.

You must have docker installed on your system to use the containers. If you don't have it, you can install it following the instructions in the Docker website.

In this direcory you have the following folders

  • Docker It contains tha basic Dockerfile that enables to build the image for the container. It is not meand for general use. If you know already how docker works and you want to fiddle with it use a copy. Personally, I suggest this option only to experiences users
  • vsCode-precompiled (suggested) Also for Visual Studio Code users. This folder contains the configuration files to use the container with the IDE. You can use it to work with the material of the course. You can find the instructions to use it in the README.md file of this folder. With this version you will use a precompiled container that is stored in the Docker Hub. This version is faster to start but it is bigger than the previous one.
  • vsCode For the user of Visual Studio Code, this folder contains the configuration files to use the container with the IDE. You can use it to work with the material of the course. You can find the instructions to use it in the README.md file of this folder. With this version you will build the container locally in your machine. Note that the DockerFile contained in ths hidden folder .devcontainer is just a symbolic link to the one in the Docker folder. The difference is that this one is used by the Visual Studio Code to build the container.

How to use the dev container in Visual Studio Code

It applies to both versions of the vsCode container

You should install the Dev Container extension in Visual Studio Code. You can do it by following the instructions in the Visual Studio Code documentation.

Once you have the extension installed, you just open the vsCode-precmpiled (or the vsCode, if you prefer) folder in Visual Studio Code and you will see a notification in the lower right corner of the window. Click on the notification and select the option Reopen in Container. The first time you do it, the container will be fetched from the docker hub (or built if you go in vsCode folder). If you build the container, the construction may take time, be patient.

Some notes

  1. The Virtual Studio Code setup is such that the container and the host share the shared_files folder. So, that folder can be used to share files between the host and the container. The shared_files folder is in the root of the repository.
  2. If you wish to obtain the same result if you build the container yourserf using the Dockerfile in Docker/ or you use the precompiled one directly from the Docker Hub, you must run the container with the following command from the directory where the shared_files folder is located:
docker run -it --rm -v $(pwd)/shared_files:/home/pacs/shared_files pacs-course/pacs-container

3.If you use a dev contained in Visual Studio Code, you can pull frequently from the repositories pacs-examples and pacs-Labs to keep the material updated, following the instruction in the README.md file of the repositories.

4.The repositories pacs-examples and pacs-Labs are cloned in the container using the https protocol. If you want to switch to the more convenient ssh protocol, you can do it by following the instructions in the main README.md file of the repositories. This applies also for the submodules of the pacs-examples repository.

About

Tools to handle containers of the course Advanced Programming for Scientific Computing (aka PACS)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published