Use this method if you have a Dockerfile that is ready to be used for production and you wish to offer a catalog item on Research Cloud based on that Dockerfile. Any external volumes (including datasets and ResearchDrive) that you attach to your workspace will be available to you in your Docker container automatically.

You need to be a developer in your collaboration to follow the steps below!

Steps (1/3): Creating the Docker plugin

  1. From the Research Cloud portal, under "Catalog", go to "Maintain plugins"
  2. Click on the "+" symbol to create a new plugin
  3. Fill out the form. Select "Docker" as "Script type".
  4. Click on the "Script source" field
  5. Enter the public repository in which you host your Dockerfile in the "Repository" field
  6. Enter the path to the Dockerfile within your repository in the "Path" field. If you Dockerfile is in the parent directory, just type "Dockerfile"
  7. It's good practice to tag your Dockerfile to follow best practices in version control, so enter your tag in the "Tag" field if you have one
  8. Click "Save", and finish the plugin creation by clicking "Submit"

Steps (2/3): Creating the Docker application

  1. From the Research Cloud portal, under "Catalog", go to "Maintain applications"
  2. Click on the "+" symbol to create a new application
  3. Click on "Continue without selection"
  4. Fill out the form, but under "Application plugins" you select in the following order: 1) RSC-OS, 2) RSC-CO, 3) RSC-External Docker, 4) <Your Plugin> . Then click on "Save"

    If you wish to enable GPUs within your Docker container, you should select the following order: 1) RSC-OS, 2) RSC-CO, 3) RSC-External plugin, 4) CUDA Conditional, 5) RSC-External Docker, 6) <Your Plugin>

  5. Under "Application parameters" you should add the co_passwordless_sudo parameter as follows: 

    By default in Research Cloud most ports to the outside world are closed(with the exception of a few default ones, such as 22, 80, 443). If you wish to expose any other port to the outside world (because perhaps your Docker container does so), you can add the following application parameter (replace "8000" with desired port): 

  6. Click on "Submit"

Steps (3/3): Creating the Docker application offer

  1. From the Research Cloud portal, under "Catalog", go to "Maintain application offers"
  2. Click on the "+" symbol to create a new application offer
  3. Click on "Continue without selection"
  4. Fill out the form, but under "Application", select the application that you created previously
  5. Select the subscription of your choice. The standard Research Cloud subscription is "SURF HPC Cloud"
  6. In the "Flavours" selection, only select Ubuntu-based flavours. If you enabled GPUs inside your Docker container, you should also select the "GPU Base" flavour.
  7. Click on "Submit"

If you wish to run docker commands without sudo you can run the following command from within your workspace: sudo usermod -aG docker $USER. Log out and in for the change to take effect.