Skip to content

Builds development container with all the dependencies built

License

Notifications You must be signed in to change notification settings

hiddenSymmetries/dev_container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simsopt Dev Container

This repo builds the image used for Simsopt Dev Container.

Build the image

The image can be built locally

  1. Install docker

  2. Build the docker image by running the docker build command:

    docker build -t <[user_name/]image_name:[tag]> -f Dockerfile.ubuntu .
    # In the above command, user_name is typically used for uploading the image to docker hub
    # For local builds, you can omit the user_name/ and just use your choice of image_name
    # Tag is optional. If not given, default is latest
  3. Upload the image to docker hub if you want to distribute it

    docker push <image_name:tag>

Run the container

There are two cases here: 1) docker image is built locally and 2) docker image downloaded from a repo

For local builds:

  1. Identify the local image using the command
     docker image ls
    After identifying the image built locally, you can use either <image_name:tag> or the image id, which is an hexadecimal number, to run the docker image in the next command

Remote repo

  1. Assuming image is uploaded to docker hub, use the <user_name/image_name:tag> to automatically download the image in the next command

  2. For interactive runs, run the docker container with the command:

    docker run -it --rm  <image>
  3. To execute a python script

    docker run -v$PWD:$PWD <image> python3 $PWD/<python_script>

    This command works only if no additional files are needed to run the script

About

Builds development container with all the dependencies built

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages