From 98854913a0daf7c23e58c16f251f5212a8548601 Mon Sep 17 00:00:00 2001 From: Gerardo Tauriello <gerardo.tauriello@unibas.ch> Date: Tue, 27 May 2025 10:39:22 +0200 Subject: [PATCH] Fix/update project paths in docker setup. --- projects/docker/Dockerfile | 2 +- projects/docker/README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/docker/Dockerfile b/projects/docker/Dockerfile index 44a04ed..3f4536b 100644 --- a/projects/docker/Dockerfile +++ b/projects/docker/Dockerfile @@ -53,7 +53,7 @@ COPY --chmod=755 docker/entrypoint.sh / ## Copy tool(s) -ARG CONVERTERSCRIPT=CoFFE-sponge-proteins/translate2modelcif.py +ARG CONVERTERSCRIPT=2025-01-ma-idk-u2osmap/translate2modelcif.py ARG CONVERTERCMD=convert2modelcif ENV CONVERTERCMD=$CONVERTERCMD COPY --chmod=755 $CONVERTERSCRIPT /usr/local/bin/$CONVERTERCMD diff --git a/projects/docker/README.md b/projects/docker/README.md index 3dbe684..8cb54be 100644 --- a/projects/docker/README.md +++ b/projects/docker/README.md @@ -54,11 +54,11 @@ The idea is to copy a translation script from one of the [projects](projects/) i The whole build of the Docker image, including installing necessary software and copying the translation script, is covered by our [Dockerfile](./Dockerfile). You just need to specify the translation script by [build time argument](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg) `CONVERTERSCRIPT` during [`docker build`](https://docs.docker.com/engine/reference/commandline/build/). By default, the translation script is renamed to `convert2modelcif` to be called as a command. This can be overwritten using build time argument `CONVERTERCMD`. There is also an alias `2cif` to the converter command, which is immutable. -The following command will build a Docker image named `converter` (with tag `latest`). The translation script will be copied from [`USDA-ASFVG/translate2modelcif.py`](projects/USDA-ASFVG/translate2modelcif.py) and made available as `convert2modelcif` in the Docker image/ `docker run`. By `MMCIF_USER_ID`, we use UID `1234` for the internal user of the Docker image, so mounted files have the right owner inside and outside of the Docker container (assuming the example user from above). Pay attention to the alternative Dockerfile location specified by `-f docker/Dockerfile`, as we are calling `docker build` from the [projects](projects/) subdirectory to get the right build context: +The following command will build a Docker image named `converter` (with tag `latest`). The translation script will be copied from [`2025-03-ma-kvko-prsa/translate2modelcif_multi_model.py`](projects/2025-03-ma-kvko-prsa/translate2modelcif_multi_model.py) and made available as `convert2modelcif` in the Docker image/ `docker run`. By `MMCIF_USER_ID`, we use UID `1234` for the internal user of the Docker image, so mounted files have the right owner inside and outside of the Docker container (assuming the example user from above). Pay attention to the alternative Dockerfile location specified by `-f docker/Dockerfile`, as we are calling `docker build` from the [projects](projects/) subdirectory to get the right build context: ```terminal $ # DOCKER_BUILDKIT=1 is only needed for older versions of Docker. -$ DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile --build-arg MMCIF_USER_ID=1234 --build-arg CONVERTERSCRIPT=USDA-ASFVG/translate2modelcif.py -t converter:latest . +$ DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile --build-arg MMCIF_USER_ID=1234 --build-arg CONVERTERSCRIPT=2025-03-ma-kvko-prsa/translate2modelcif_multi_model.py -t converter:latest . $ ``` @@ -85,7 +85,7 @@ $ The dedicated translation script is made available inside the Docker container as a direct [bind mount](https://docs.docker.com/storage/bind-mounts/) to the installed converter command. The remaining parameters are the same as for the [app-like](#run-a-fixed-converter-from-within-the-docker-container-app-like) `docker run` command: ```terminal -$ docker run --rm -v /home/user/models:/data -v $(pwd)/USDA-ASFVG/translate2modelcif.py:/usr/local/bin/convert2modelcif -t converter:latest convert2modelcif /data/ /data/proteome_accessions.csv +$ docker run --rm -v /home/user/models:/data -v $(pwd)/2025-03-ma-kvko-prsa/translate2modelcif_multi_model.py:/usr/local/bin/convert2modelcif -t converter:latest convert2modelcif /data/ /data/proteome_accessions.csv $ ``` -- GitLab