Skip to content
Snippets Groups Projects
Commit ed6aad8d authored by Quang tru HUYNH's avatar Quang tru HUYNH
Browse files

CI with singularity image

parent ebeebdc8
No related branches found
No related tags found
No related merge requests found
Pipeline #99022 failed
......@@ -10,18 +10,18 @@ docker:
script:
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" registry-gitlab.pasteur.fr
- export MY_TIME=`date +"%F-%H%M"`
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" -t "$CI_REGISTRY_IMAGE:latest" -t "$CI_REGISTRY_IMAGE:$MY_TIME" . -f Dockerfile
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" -t "$CI_REGISTRY_IMAGE:$MY_TIME" . -f Dockerfile
- docker push "$CI_REGISTRY_IMAGE"
#singularity:
# stage: build
# image:
# name: quay.io/singularity/singularity:v3.11.0
# entrypoint: [""]
# script:
# - singularity build singularity.sif Singularity
# - ls -lh singularity.sif
# - singularity push --docker-username "${CI_REGISTRY_USER}" --docker-password "${CI_REGISTRY_PASSWORD}" singularity.sif oras://"$CI_REGISTRY_IMAGE":latest
# artifacts:
# paths:
# - singularity.sif
singularity:
stage: build
image:
name: quay.io/singularity/singularity:v3.11.0
entrypoint: [""]
script:
- singularity build singularity.sif Singularity
- ls -lh singularity.sif
- singularity push --docker-username "${CI_REGISTRY_USER}" --docker-password "${CI_REGISTRY_PASSWORD}" singularity.sif oras://"$CI_REGISTRY_IMAGE":latest
artifacts:
paths:
- singularity.sif
......@@ -15,3 +15,15 @@
- cuda-nsight-compute
- nsight-compute
- cuda-demo-suite
# usage
docker:
```
docker run -ti docker://registry-gitlab.pasteur.fr/tru/miniconda3-python310-pytorch-cuda11.7:main
```
singularity/apptainer:
```
singularity build miniconda3-python310-pytorch-cuda11.7.sif oras://registry-gitlab.pasteur.fr/tru/miniconda3-python310-pytorch-cuda11.7:latest
```
Bootstrap: docker
From: continuumio/miniconda3
# update conda and the OS
conda update conda && \
conda upgrade --all -y && \
apt-get update && \
apt-get -y install curl && \
DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \
DEBIAN_FRONTEND=noninteractive apt-get -y autoremove && \
DEBIAN_FRONTEND=noninteractive apt-get -y clean autoclean
# download the yml file
curl https://gitlab.pasteur.fr/tru/miniconda3-python310-pytorch-cuda11.7/-/raw/main/conda-env-export.yml > conda-env-export.yml && \
conda create --name py310-pytorch --file conda-env-export.yml && \
eval "$(conda shell.bash hook)" && \
conda activate py310-pytorch && \
conda list --explicit > /tmp/conda-list--explicit.yml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment