Skip to content
AmosFong1Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

53 Commits

Folders and files

Repository files navigation

Docker

This is how I build images locally, push them to Docker Hub, and run them on the GSC HPC with Singularity.

Docker Hub: https://hub.docker.com/repositories/amosfong1

Environment variables

PATH_TO_DOCKERFILE=""
DOCKER_USERNAME="amosfong1"
DOCKER_IMAGE_NAME=""
TAG=""
PLATFORM="linux/amd64"
LOCAL_PORT=""
REMOTE_HOST="gphost01.bcgsc.ca"
REMOTE_PORT=""
SSH_USERNAME="amfong"
SSH_SERVER="ssh.bcgsc.ca"

Build image

Apple Silicon Macs build linux/arm64 by default, but the GSC HPC requires linux/amd64.

cd ${PATH_TO_DOCKERFILE}
docker buildx build --platform ${PLATFORM} -t ${DOCKER_USERNAME}/${DOCKER_IMAGE_NAME}:${TAG} .

Push on local machine

docker push ${DOCKER_USERNAME}/${DOCKER_IMAGE_NAME}:${TAG}

Pull on the HPC

singularity pull docker://${DOCKER_USERNAME}/${DOCKER_IMAGE_NAME}:${TAG}

Launch container

sh rscript.sh
sh rserver.sh
sh python.sh
sh jupyter_lab.sh

Port forwarding

ssh -oHostKeyAlgorithms=+ssh-rsa -N -L ${LOCAL_PORT}:${REMOTE_HOST}:${REMOTE_PORT} ${SSH_USERNAME}@${SSH_SERVER}

Access remote service

Open http://localhost:${LOCAL_PORT}.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages