-
Notifications
You must be signed in to change notification settings - Fork 13
Using Docker Images
To install Docker on your own computer (not needed, if you are using the SoCS lab computers!!), make sure you follow the instructions for your OS (Windows, MacOS, Linux) at https://docs.docker.com/get-docker/. Make sure you also have docker-compose
installed (is default in the standard installation packages, so normally nothing needs to be done).
The deployment of a Docker container can be made very easy and straight forward with the use of docker-compose. The configuration file for this module should be downloaded from https://raw.githubusercontent.com/LCAS/kasm-workspaces-core-images/develop/kasm-lcas-jammy.docker-compose.yaml. Save this single configuration file in a directory (e.g named lcas-docker
, or similar). It is from this folder that you will start your docker container, so remember where it is.
If you have an NVIDIA GPU on your computer, you can use a CUDA-enabled version of the image. You only need to use another docker-compose file. Get it here: https://raw.githubusercontent.com/LCAS/kasm-workspaces-core-images/nvidia_develop/kasm-lcas-jammy.docker-compose.yaml
You also need to install the NVIDIA container runtime first on your computer that runs docker.
- Open a terminal / powershell on your computer
- Log in to the L-CAS docker registry, i.e. run
docker login lcas.lincoln.ac.uk
, with user namelcas
, and passwordlincoln
- Navigate to the directory where you have saved the file
kasm-lcas-jammy.docker-compose.yaml
(see above). - In this directory run
docker compose -f kasm-lcas-jammy.docker-compose.yaml pull
(on slightly older docker installations the command is acutallydocker-compose
with a-
). When you do this the very first time it will take quite a long time, as the image is being downloaded first from the registry. It's advisable to run this every time before you start working, to ensure you always have the latest version. - Still in the directory, run
docker compose -f kasm-lcas-jammy.docker-compose.yaml up -d
, which will start the container with the virtual desktop (again, on your installation it may bedocker-compose
with a-
) - open https://localhost:6901 in your browser (Chrome works best). Use username
kasm_user
with passwordpassword
to log in. You can now develop in the provided desktop environment
Note: Any changes you have been done in your home directory on this desktop are retained and will still be there when you start the container again next time, but you must never assume that the data is safe. Always keep a copy of all your source code (i.e. push to GitHub or the likes). Also, this means if anyone else starts the container, they have access to all your data, unless you delete them, see next section. You must NOT leave any personal data (including logins and password) on the lab PCs when you leave, so it's important you clean up after yourself
Note: If you have installed docker with sudo on linux, you may receive the following error message when logging in Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/auth": dial unix /var/run/docker.sock: connect: permission denied
if so, run all docker commands beginning with sudo
or add your user to the docker group.
- stop all processes inside the virtual desktop (e.g. with
[ctrl-c]
in the terminals) - make sure you have saved all your work somewhere, e.g. on github, uploaded to OneDrive (browser), or on Teams (you can have a chat with yourself to keep notes and files!)
- If you are on a shared computer (e.g. the lab PCs), make sure you log out of everything and you removed any password files etc.
- make sure to stop the container with the command
docker compose -f kasm-lcas-jammy.docker-compose.yaml down
-
If you are on a shared computer (e.g. the lab PCs) and you want to really make sure all your personal information is removed, simply run
docker volume rm kasm_lcas_jammy_home_root
to wipe all user files. Then, next time the container is restarted, it starts we a blank user directory (So, make sure you know how to quickly recreate your working environment. Again, best practice is to use something like git with https://github.com or https://gitlab.com