Skip to content

Commit

Permalink
Merge pull request #461 from sunbeam-labs/460-fix-docker-tagging
Browse files Browse the repository at this point in the history
460 fix docker tagging
  • Loading branch information
Ulthran authored Mar 22, 2024
2 parents 27c7643 + 13004ad commit 77bdf67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions dev_scripts/generate_and_push_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
# NOT YET AT THE POINT WHERE IT SHOULD BE RUN AS A SCRIPT
# THIS SHOULD JUST PROVIDE GUIDANCE FOR DOING IT MANUALLY

sunbeam init --data_fp tests/data/reads/ projects/docker/
sunbeam run --profile projects/docker/ --containerize > Dockerfile

docker build -f Dockerfile -t sunbeam4.2.0 .
docker build -f Dockerfile -t sunbeamlabs/sunbeam:4.2.0 .

docker images # Find image ID in output

docker tag image_id ctbushman/sunbeam:4.2.0
docker tag image_id sunbeamlabs/sunbeam:4.2.0 # If not already tagged properly

docker run --rm -it sunbeamlabs/sunbeam:4.2.0 /bin/bash # Test the image

docker push ctbushman/sunbeam:4.2.0
docker push sunbeamlabs/sunbeam:4.2.0
2 changes: 1 addition & 1 deletion src/sunbeamlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __str__(self) -> str:


def get_docker_str(repo: str, user: str = "sunbeamlabs") -> str:
docker_tag = os.environ.get("SUNBEAM_DOCKER_TAG", __version__)
docker_tag = os.environ.get("SUNBEAM_DOCKER_TAG", f"v{__version__}")

return f"docker://{user}/{repo}:{docker_tag}"

Expand Down
2 changes: 1 addition & 1 deletion workflow/envs/qc.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /home/qc_env
COPY workflow/envs/qc.yml ./

# Install environment
RUN conda env create --file qc.yml --name qc
RUN mamba env create --file qc.yml --name qc

ENV PATH="/opt/conda/envs/qc/bin/:${PATH}"

Expand Down

0 comments on commit 77bdf67

Please sign in to comment.