diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 230b711..0c10322 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -29,12 +29,20 @@ jobs: - name: Set up docker uses: docker/setup-buildx-action@v3 + - name: Login to GitHub container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and export to Docker uses: docker/build-push-action@v5 with: context: . tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }} load: true + push: true cache-from: | type=local,src=/home/runner/.buildx-cache type=registry,ref=${{ env.IMAGE_NAME }}:latest diff --git a/README.md b/README.md index 79cc35a..a1c68c4 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,10 @@ simulation jobs levereging on the Geant4 and NVIDIA OptiX ray tracing capabiliti ### Prerequisites -Before starting, make sure you have the following prerequisites installed: +Before starting, make sure you have the following prerequisites available and installed: * A CUDA-capable NVIDIA GPU +* [Docker Engine](https://docs.docker.com/engine/install/) * NVIDIA container toolkit ([installation guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)) @@ -68,39 +69,27 @@ Now, the `esi-shell` image can be built locally docker build -t esi-shell . ``` -At runtime, make sure that the environment variable `OPTIX_DIR` is configured to point to the -directory where OptiX is installed, e.g. +For local development with OptiX, install it on your host system. We recommend installing OptiX in +`/usr/local/optix` but any other path will be as good: -```shell -export OPTIX_DIR=/usr/local/optix ``` - -#### Docker - -If preferred, one can pull a tagged release from the registry and work with the images directly. The list of all tagged -releases can be found [here](https://github.com/BNLNPPS/esi-shell/pkgs/container/esi-shell). Run the tagged image with -the local NVIDIA OptiX installation, e.g.: - -```shell -docker run --rm -it --gpus all -v /usr/local/optix:/usr/local/optix ghcr.io/bnlnpps/esi-shell: +export OPTIX_DIR=$HOME/optix +mkdir -p $OPTIX_DIR +./NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh --prefix=$OPTIX_DIR ``` -Explanation of the docker command: +When running `esi-shell`, make sure that the environment variable `OPTIX_DIR` is configured to point +to the directory where OptiX is installed. If not set, the default path `OPTIX_DIR=/usr/local/optix` +will be mounted insdie the container at runtime. -``` -docker run: Instructs Docker to run a container. ---rm: Ensures that the container is removed after it stops running. --it: Make the container interactive. ---gpus all: Specifies that all available GPUs should be accessible within the container. --v /usr/local/optix:/usr/local/optix: Mounts the host directory /usr/local/optix into the container at the same location. --e HOME=/esi-shell: Sets the environment variable HOME to /esi-shell within the container. -ghcr.io/bnlnpps/esi-shell:1.0.0-beta.4: Image and tag in github package registry. -``` ---- +#### Docker -Convert gdml geometry to CSG +If preferred, you can pull a tagged release from the registry and work with the images directly. The +list of all tagged releases can be found +[here](https://github.com/BNLNPPS/esi-shell/pkgs/container/esi-shell). Run the tagged image with +the local NVIDIA OptiX installation, e.g.: -``` -opticks/g4cx/tests/G4CXOpticks_setGeometry_Test.sh +```shell +docker run --rm -it --gpus all -v /usr/local/optix:$OPTIX_DIR ghcr.io/bnlnpps/esi-shell: ```