diff --git a/build-local-docker.sh b/build-local-docker.sh index fbb1098..c0bd733 100755 --- a/build-local-docker.sh +++ b/build-local-docker.sh @@ -10,17 +10,17 @@ echo "tensorflow_version=$tensorflow_version" echo "tag=$tag" echo "image=$image" -## CPU version +### CPU version #DOCKER_BUILDKIT=1 docker buildx build --no-cache -t ghcr.io/pharmbio/$image:${tag} \ # --build-arg BASE_IMAGE=tensorflow/tensorflow:${tensorflow_version}-jupyter \ # -f docker/env.cuda.Dockerfile . || exit 1 +# # GPU version -DOCKER_BUILDKIT=1 docker buildx build --no-cache -t ghcr.io/pharmbio/$image:${tag}-gpu \ +DOCKER_BUILDKIT=1 docker buildx build -t ghcr.io/pharmbio/$image:${tag}-gpu \ --build-arg BASE_IMAGE=tensorflow/tensorflow:${tensorflow_version}-gpu-jupyter \ -f docker/env.cuda.Dockerfile . || exit 1 -echo Push image with command: +echo "Push with this command" echo docker push "ghcr.io/pharmbio/$image:${tag}-gpu" -#docker push "ghcr.io/pharmbio/$image:$tag-devel" diff --git a/build-push-local-docker.sh b/build-push-local-docker.sh new file mode 100755 index 0000000..1f69a35 --- /dev/null +++ b/build-push-local-docker.sh @@ -0,0 +1,26 @@ +#!/bin/bash +#set -xv + +git_branch="$(git branch --show-current)" +tag=$git_branch +tensorflow_version="${git_branch#tf-}" # remove prefix +tensorflow_version="${tensorflow_version%-*}" # remove suffix +image="pharmbio-notebook" +echo "tensorflow_version=$tensorflow_version" +echo "tag=$tag" +echo "image=$image" + +## CPU version +DOCKER_BUILDKIT=1 docker buildx build --no-cache -t ghcr.io/pharmbio/$image:${tag} \ + --build-arg BASE_IMAGE=tensorflow/tensorflow:${tensorflow_version}-jupyter \ + -f docker/env.cuda.Dockerfile . || exit 1 + +docker push "ghcr.io/pharmbio/$image:${tag}" + +# GPU version +DOCKER_BUILDKIT=1 docker buildx build -t ghcr.io/pharmbio/$image:${tag}-gpu \ + --build-arg BASE_IMAGE=tensorflow/tensorflow:${tensorflow_version}-gpu-jupyter \ + -f docker/env.cuda.Dockerfile . || exit 1 + +echo docker push "ghcr.io/pharmbio/$image:${tag}-gpu" + diff --git a/docker/env.cuda.Dockerfile b/docker/env.cuda.Dockerfile index 6ff7cd9..926cd97 100644 --- a/docker/env.cuda.Dockerfile +++ b/docker/env.cuda.Dockerfile @@ -55,17 +55,12 @@ COPY requirements.txt . RUN python3 -m pip install --no-cache-dir --upgrade pip && \ python3 -m pip install --no-cache-dir -r requirements.txt -RUN echo "Installing for CUDA framework" +RUN echo "Installing for CUDA framework" RUN python3 -m pip install --no-cache-dir --index-url https://download.pytorch.org/whl/cu121 \ torch==2.4.1 \ torchvision \ torchaudio - -# RUN python3 -m pip install --no-cache-dir --index-url https://download.pytorch.org/whl/cu121 \ -# torch==2.2.1 \ -# torchvision \ -# torchaudio; # RUN python3 -m pip install \ # --extra-index-url=https://pypi.nvidia.com \ # cudf-cu12==24.6.* dask-cudf-cu12==24.6.* cuml-cu12==24.6.* \ @@ -74,8 +69,6 @@ RUN python3 -m pip install --no-cache-dir --index-url https://download.pytorch.o # raft-dask-cu12==24.6.* cuvs-cu12==24.6.*; - - # Add pharmbio templates, examples and misc #WORKDIR /pharmbio/ #COPY README.md . diff --git a/requirements.txt b/requirements.txt index d3ec534..b8eaadd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,3 +29,4 @@ fastparquet #umap-learn #torchsummary scanpy +jupyterlab