Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web UI #7

Merged
merged 19 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ COPY ./bioimageio_colab/register_sam_service.py /app/register_sam_service.py
# Change ownership of the application directory to the non-root user
RUN chown -R bioimageio_colab:bioimageio_colab /app/

# Add a build argument for cache invalidation
ARG CACHEBUST=1

# Fetch the Hypha server version and reinstall or upgrade hypha-rpc to the matching version
RUN HYPHA_VERSION=$(curl -s https://hypha.aicell.io/config.json | jq -r '.hypha_version') && \
pip install --upgrade "hypha-rpc<=$HYPHA_VERSION"
Expand Down
3 changes: 1 addition & 2 deletions bioimageio_colab/register_sam_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ async def register_service(args: dict) -> None:
# remove the user id from the storage
# returns True if the user was removed successfully
"remove_user_id": remove_user_id, # TODO: add a timeout to remove a user after a certain time
},
overwrite=True,
}
)
sid = service_info["id"]
assert sid == f"{args.workspace_name}/{args.client_id}:{args.service_id}"
Expand Down
5 changes: 4 additions & 1 deletion build_and_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ IMAGE_NAME=ghcr.io/${GITHUB_REPOSITORY}:latest
# Log in to GHCR
echo "$GHCR_PAT" | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin

# Build the Docker image using Docker Compose
# Generate a dynamic CACHEBUST value (timestamp)
export CACHEBUST=$(date +%Y%m%d%H%M%S)

# Build the Docker image using Docker Compose with the CACHEBUST argument
docker-compose build

# Push the Docker image to GHCR
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
context: .
dockerfile: Dockerfile
args:
SOURCE_LABEL: "https://github.com/bioimage-io/bioimageio-colab"
CACHEBUST: ${CACHEBUST}
image: ghcr.io/bioimage-io/bioimageio-colab:latest
env_file:
- .env
Expand Down
Loading
Loading