diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index c647cb51..ba81a21d 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -4,13 +4,16 @@ on: push: paths: - "official-templates/base/**" + workflow_dispatch: jobs: build: - runs-on: ubuntu-latest-public-m + runs-on: blacksmith-4vcpu-ubuntu-2204 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Clear space to remove unused folders run: | @@ -19,18 +22,20 @@ jobs: rm -rf "/usr/local/share/boost" rm -rf "$AGENT_TOOLSDIRECTORY" - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set up Docker Buildx + uses: useblacksmith/build-push-action@v1.1 + with: + setup-only: true + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Determine if this is a production build id: build_type run: | @@ -40,26 +45,34 @@ jobs: echo "is_production=false" >> $GITHUB_OUTPUT fi - - name: Set environment variables + - name: Get changed docker-bake.hcl files + id: changed_files + uses: tj-actions/changed-files@v46 + with: + files: | + **/docker-bake.hcl + + - name: Set Environment Variables + if: steps.build_type.outputs.is_production != 'true' run: | - # Set environment variable to disable entitlements checks - echo "BUILDX_BAKE_ENTITLEMENTS_FS=0" >> $GITHUB_ENV + BRANCH_NAME=$(echo ${GITHUB_REF##refs/heads/} | sed 's/\//-/g') + echo "RELEASE=dev-${BRANCH_NAME}" >> $GITHUB_ENV - # Only set RELEASE for development builds - # For production, we'll use the default from docker-bake.hcl - if [[ "${{ steps.build_type.outputs.is_production }}" != "true" ]]; then - # For development builds (non-main branches) - # Convert branch name to tag-friendly format (replace / with -) - BRANCH_NAME=$(echo ${GITHUB_REF##refs/heads/} | sed 's/\//-/g') - # Add dev- prefix to the branch name - echo "RELEASE=dev-${BRANCH_NAME}" >> $GITHUB_ENV - fi + - name: Convert changed files to CSV format + if: steps.changed_files.outputs.any_changed == 'true' + id: changed_files_csv + run: | + echo "files=${{ steps.changed_files.outputs.all_changed_files }}" | tr ' ' ',' >> $GITHUB_OUTPUT - - name: Build and push the images to Docker Hub - uses: docker/bake-action@v2 + - name: Build and push images + if: steps.changed_files.outputs.any_changed == 'true' + uses: docker/bake-action@v6 + env: + BUILDX_BAKE_ENTITLEMENTS_FS: 0 with: - files: ./official-templates/base/docker-bake.hcl + source: . + files: "official-templates/base/docker-bake.hcl" #${{ steps.changed_files_csv.outputs.files }} push: true set: | ${{ steps.build_type.outputs.is_production != 'true' && format('*.args.RELEASE={0}', env.RELEASE) || '' }} - *.args.GITHUB_WORKSPACE=${{ github.workspace }} + *.args.GITHUB_WORKSPACE=${{ github.workspace }} \ No newline at end of file diff --git a/.github/workflows/comfyui.yml b/.github/workflows/comfyui.yml index 22dd01f3..77f26e67 100644 --- a/.github/workflows/comfyui.yml +++ b/.github/workflows/comfyui.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-latest-public-m + runs-on: blacksmith-4vcpu-ubuntu-2204 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/LICENSE b/LICENSE index 65603cc2..8b844538 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Run-Pod +Copyright (c) 2022 RunPod, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index d12535e1..de702332 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,11 @@ The following dependencies are required as part of RunPod platform functionality - `nginx` - Required for proxying ports to the user. - `openssh-server` - Required for SSH access to the container. -- 'pip install jupyterlab' - Required for JupyterLab access to the container. +- `pip install jupyterlab` - Required for JupyterLab access to the container. ### runpod.yaml -Each container foulder needs to have a runpod.yaml file. This file will contain version info as well as services to be ran. The runpod.yaml file should be formatted as follows: +Each container folder needs to have a runpod.yaml file. This file will contain version info as well as services to be ran. The runpod.yaml file should be formatted as follows: ```yaml version: '1.0.0' diff --git a/helper-templates/verify-nccl/Dockerfile b/helper-templates/verify-nccl/Dockerfile index c48b2d0c..ca159f5d 100644 --- a/helper-templates/verify-nccl/Dockerfile +++ b/helper-templates/verify-nccl/Dockerfile @@ -14,8 +14,7 @@ RUN git clone https://github.com/NVIDIA/cuda-samples.git && \ cd cuda-samples/Samples/0_Introduction/simpleP2P && \ make -COPY check_nccl.sh . -RUN chmod +x check_nccl.sh +COPY --chmod=755 check_nccl.sh . # Start Container CMD tail -f /dev/null diff --git a/official-templates/base/Dockerfile b/official-templates/base/Dockerfile index 6b2afa12..df2410b9 100644 --- a/official-templates/base/Dockerfile +++ b/official-templates/base/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE +ARG BASE_IMAGE=non-existing FROM ${BASE_IMAGE} SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -105,11 +105,8 @@ RUN apt install --yes --no-install-recommends \ # Add the Python PPA RUN add-apt-repository ppa:deadsnakes/ppa -# Install Python 3.8-3.11 with distutils +# Install Python 3.9-3.11 with distutils RUN apt install --yes --no-install-recommends \ - python3.8-dev \ - python3.8-venv \ - python3.8-distutils \ python3.9-dev \ python3.9-venv \ python3.9-distutils \ @@ -137,7 +134,6 @@ RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen # Install pip RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ - python3.8 get-pip.py && \ python3.9 get-pip.py && \ python3.10 get-pip.py && \ python3.11 get-pip.py && \ @@ -146,16 +142,14 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ rm get-pip.py # Get the latest pip for all python versions -RUN python3.8 -m pip install --upgrade pip && \ - python3.9 -m pip install --upgrade pip && \ +RUN python3.9 -m pip install --upgrade pip && \ python3.10 -m pip install --upgrade pip && \ python3.11 -m pip install --upgrade pip && \ python3.12 -m pip install --upgrade pip && \ python3.13 -m pip install --upgrade pip # Install virtualenv -RUN python3.8 -m pip install virtualenv && \ - python3.9 -m pip install virtualenv && \ +RUN python3.9 -m pip install virtualenv && \ python3.10 -m pip install virtualenv && \ python3.11 -m pip install virtualenv && \ python3.12 -m pip install virtualenv && \ @@ -197,10 +191,8 @@ COPY --from=proxy readme.html /usr/share/nginx/html/readme.html COPY README.md /usr/share/nginx/html/README.md # Start Scripts -COPY --from=scripts start.sh / -COPY --from=base post_start.sh / -RUN chmod +x /start.sh && \ - chmod +x /post_start.sh +COPY --from=scripts --chmod=755 start.sh / +COPY --chmod=755 post_start.sh / # Welcome Message COPY --from=logo runpod.txt /etc/runpod.txt diff --git a/official-templates/base/docker-bake.hcl b/official-templates/base/docker-bake.hcl index 2d42f579..dbb276ec 100644 --- a/official-templates/base/docker-bake.hcl +++ b/official-templates/base/docker-bake.hcl @@ -7,17 +7,17 @@ variable "GITHUB_WORKSPACE" { } group "default" { - targets = ["cpu", "11-1-1", "11-8-0", "12-1-0", "12-2-0", "12-4-1", "12-5-1", "12-6-2"] + targets = ["cpu", "12-1-0", "12-2-0", "12-4-1", "12-5-1", "12-6-2"] } target "cpu" { - dockerfile = "${GITHUB_WORKSPACE}/official-templates/base/Dockerfile" + context = "${GITHUB_WORKSPACE}/official-templates/base" + dockerfile = "Dockerfile" tags = ["runpod/base:${RELEASE}-cpu"] contexts = { - scripts = "${GITHUB_WORKSPACE}/container-template" - proxy = "${GITHUB_WORKSPACE}/container-template/proxy" - logo = "${GITHUB_WORKSPACE}/container-template" - base = "${GITHUB_WORKSPACE}/official-templates/base" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_RELEASE_VERSION = "${RELEASE}" @@ -26,13 +26,13 @@ target "cpu" { } target "11-1-1" { - dockerfile = "${GITHUB_WORKSPACE}/official-templates/base/Dockerfile" + context = "${GITHUB_WORKSPACE}/official-templates/base" + dockerfile = "Dockerfile" tags = ["runpod/base:${RELEASE}-cuda11.1.1"] contexts = { - scripts = "${GITHUB_WORKSPACE}/container-template" - proxy = "${GITHUB_WORKSPACE}/container-template/proxy" - logo = "${GITHUB_WORKSPACE}/container-template" - base = "${GITHUB_WORKSPACE}/official-templates/base" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_RELEASE_VERSION = "${RELEASE}" @@ -41,13 +41,13 @@ target "11-1-1" { } target "11-8-0" { - dockerfile = "${GITHUB_WORKSPACE}/official-templates/base/Dockerfile" + context = "${GITHUB_WORKSPACE}/official-templates/base" + dockerfile = "Dockerfile" tags = ["runpod/base:${RELEASE}-cuda11.8.0"] contexts = { - scripts = "${GITHUB_WORKSPACE}/container-template" - proxy = "${GITHUB_WORKSPACE}/container-template/proxy" - logo = "${GITHUB_WORKSPACE}/container-template" - base = "${GITHUB_WORKSPACE}/official-templates/base" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_RELEASE_VERSION = "${RELEASE}" @@ -56,13 +56,13 @@ target "11-8-0" { } target "12-1-0" { - dockerfile = "${GITHUB_WORKSPACE}/official-templates/base/Dockerfile" + context = "${GITHUB_WORKSPACE}/official-templates/base" + dockerfile = "Dockerfile" tags = ["runpod/base:${RELEASE}-cuda12.1.0"] contexts = { - scripts = "${GITHUB_WORKSPACE}/container-template" - proxy = "${GITHUB_WORKSPACE}/container-template/proxy" - logo = "${GITHUB_WORKSPACE}/container-template" - base = "${GITHUB_WORKSPACE}/official-templates/base" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_RELEASE_VERSION = "${RELEASE}" @@ -71,13 +71,13 @@ target "12-1-0" { } target "12-2-0" { - dockerfile = "${GITHUB_WORKSPACE}/official-templates/base/Dockerfile" + context = "${GITHUB_WORKSPACE}/official-templates/base" + dockerfile = "Dockerfile" tags = ["runpod/base:${RELEASE}-cuda12.2.0"] contexts = { - scripts = "${GITHUB_WORKSPACE}/container-template" - proxy = "${GITHUB_WORKSPACE}/container-template/proxy" - logo = "${GITHUB_WORKSPACE}/container-template" - base = "${GITHUB_WORKSPACE}/official-templates/base" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_RELEASE_VERSION = "${RELEASE}" @@ -86,12 +86,13 @@ target "12-2-0" { } target "12-4-1" { + context = "${GITHUB_WORKSPACE}/official-templates/base" dockerfile = "Dockerfile" tags = ["runpod/base:${RELEASE}-cuda12.4.1"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_RELEASE_VERSION = "${RELEASE}" @@ -100,12 +101,13 @@ target "12-4-1" { } target "12-5-1" { + context = "${GITHUB_WORKSPACE}/official-templates/base" dockerfile = "Dockerfile" tags = ["runpod/base:${RELEASE}-cuda12.5.1"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_RELEASE_VERSION = "${RELEASE}" @@ -114,12 +116,13 @@ target "12-5-1" { } target "12-6-2" { + context = "${GITHUB_WORKSPACE}/official-templates/base" dockerfile = "Dockerfile" tags = ["runpod/base:${RELEASE}-cuda12.6.2"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_RELEASE_VERSION = "${RELEASE}" diff --git a/official-templates/bittensor/Dockerfile b/official-templates/bittensor/Dockerfile index 25e1f9dd..5132b263 100644 --- a/official-templates/bittensor/Dockerfile +++ b/official-templates/bittensor/Dockerfile @@ -71,9 +71,8 @@ COPY --from=proxy readme.html /usr/share/nginx/html/readme.html COPY README.md /usr/share/nginx/html/README.md # Start Scripts -COPY pre_start.sh /pre_start.sh -COPY --from=scripts start.sh / -RUN chmod +x /start.sh && chmod +x /pre_start.sh +COPY --chmod=755 pre_start.sh /pre_start.sh +COPY --chmod=755 --from=scripts start.sh / SHELL ["/bin/bash", "--login", "-c"] CMD [ "/start.sh" ] diff --git a/official-templates/bittensor/docker-bake.hcl b/official-templates/bittensor/docker-bake.hcl index f0a9f0b8..f6eb8b0c 100644 --- a/official-templates/bittensor/docker-bake.hcl +++ b/official-templates/bittensor/docker-bake.hcl @@ -1,15 +1,20 @@ variable "VERSION" { - default = "5.3.3" + default = "5.3.3" +} + +variable "GITHUB_WORKSPACE" { + default = "." # replaced with cwd } target "default" { - dockerfile = "Dockerfile" - tags = ["runpod/bittensor:${VERSION}"] - contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - } - args = { - VERSION = "${VERSION}" - } + context = "${GITHUB_WORKSPACE}/official-templates/bittensor" + dockerfile = "Dockerfile" + tags = ["runpod/bittensor:${VERSION}"] + contexts = { + scripts = "container-template" + proxy = "container-template/proxy" + } + args = { + VERSION = "${VERSION}" + } } diff --git a/official-templates/discoart/.Dockerfile.swp b/official-templates/discoart/.Dockerfile.swp deleted file mode 100644 index 8bcbe1cf..00000000 Binary files a/official-templates/discoart/.Dockerfile.swp and /dev/null differ diff --git a/official-templates/discoart/Dockerfile b/official-templates/discoart/Dockerfile index 01892f5f..031f1653 100644 --- a/official-templates/discoart/Dockerfile +++ b/official-templates/discoart/Dockerfile @@ -1,8 +1,8 @@ FROM entmike/discoart:preload # Set bash as default shell, non-interactive -ENV DEBIAN_FRONTEND noninteractive\ - SHELL=/bin/bash +ENV DEBIAN_FRONTEND noninteractive +ENV SHELL=/bin/bash # Create workspace working directory WORKDIR /workspace @@ -59,7 +59,6 @@ RUN rm -Rf /root/.cache && mkdir -p /models/.cache && ln -s /models/.cache /root # Start Scripts COPY pre_start.sh /pre_start.sh -COPY --from=scripts start.sh / -RUN chmod +x /start.sh +COPY --chmod=755 --from=scripts start.sh / CMD [ "/start.sh" ] diff --git a/official-templates/discoart/README.md b/official-templates/discoart/README.md index d86bc4af..568c9bfd 100644 --- a/official-templates/discoart/README.md +++ b/official-templates/discoart/README.md @@ -1 +1 @@ -Tempalte for: https://github.com/jina-ai/discoart +Template for: https://github.com/jina-ai/discoart diff --git a/official-templates/discoart/docker-bake.hcl b/official-templates/discoart/docker-bake.hcl index 9b34a887..41b21f12 100644 --- a/official-templates/discoart/docker-bake.hcl +++ b/official-templates/discoart/docker-bake.hcl @@ -1,16 +1,17 @@ -variable "IMAGE_NAME" { - default = "runpod/discoart" +variable "RELEASE" { + default = "0.0.0" } -variable "RELEASE" { - default = "0.0.0" +variable "GITHUB_WORKSPACE" { + default = "." } target "default" { - dockerfile = "Dockerfile" - tags = ["${IMAGE_NAME}:${RELEASE}"] - contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - } + context = "${GITHUB_WORKSPACE}/official-templates/discoart" + dockerfile = "Dockerfile" + tags = ["runpod/discoart:${RELEASE}"] + contexts = { + scripts = "container-template" + proxy = "container-template/proxy" + } } diff --git a/official-templates/fast-stable-diffusion/Dockerfile b/official-templates/fast-stable-diffusion/Dockerfile index b78e0b55..0a1c6dc1 100644 --- a/official-templates/fast-stable-diffusion/Dockerfile +++ b/official-templates/fast-stable-diffusion/Dockerfile @@ -1,5 +1,5 @@ # Import necessary base images -FROM runpod/stable-diffusion:models-1.0.0 as sd-models +FROM runpod/stable-diffusion:models-1.0.0 AS sd-models FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 @@ -72,8 +72,7 @@ COPY README.md /usr/share/nginx/html/README.md # Start Scripts COPY pre_start.sh /pre_start.sh -COPY --from=scripts start.sh / -RUN chmod +x /start.sh +COPY --chmod=755 --from=scripts start.sh / # Force RUN pip install --upgrade --force-reinstall torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 diff --git a/official-templates/fast-stable-diffusion/docker-bake.hcl b/official-templates/fast-stable-diffusion/docker-bake.hcl index f1aa368c..e8d60243 100644 --- a/official-templates/fast-stable-diffusion/docker-bake.hcl +++ b/official-templates/fast-stable-diffusion/docker-bake.hcl @@ -1,12 +1,17 @@ variable "RELEASE" { - default = "2.4.0" + default = "2.4.0" +} + +variable "GITHUB_WORKSPACE" { + default = "." } target "default" { - dockerfile = "Dockerfile" - tags = ["runpod/stable-diffusion:fast-stable-diffusion-${RELEASE}"] - contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - } + context = "${GITHUB_WORKSPACE}/official-templates/fast-stable-diffusion" + dockerfile = "Dockerfile" + tags = ["runpod/stable-diffusion:fast-stable-diffusion-${RELEASE}"] + contexts = { + scripts = "container-template" + proxy = "container-template/proxy" + } } diff --git a/official-templates/invokeai/Dockerfile b/official-templates/invokeai/Dockerfile index 6c75c829..0ebe1e56 100644 --- a/official-templates/invokeai/Dockerfile +++ b/official-templates/invokeai/Dockerfile @@ -26,8 +26,7 @@ COPY --from=proxy readme.html /usr/share/nginx/html/readme.html COPY README.md /usr/share/nginx/html/README.md # Start Scripts -COPY pre_start.sh /pre_start.sh -COPY --from=scripts start.sh / -RUN chmod +x /start.sh && chmod +x /pre_start.sh +COPY --chmod=755 pre_start.sh /pre_start.sh +COPY --chmod=755 --from=scripts start.sh / CMD [ "/start.sh" ] diff --git a/official-templates/invokeai/docker-bake.hcl b/official-templates/invokeai/docker-bake.hcl index 85c28ead..42020ee0 100644 --- a/official-templates/invokeai/docker-bake.hcl +++ b/official-templates/invokeai/docker-bake.hcl @@ -1,12 +1,17 @@ variable "RELEASE" { - default = "3.3.0" + default = "3.3.0" +} + +variable "GITHUB_WORKSPACE" { + default = "." } target "default" { - dockerfile = "Dockerfile" - tags = ["runpod/stable-diffusion:invoke-${RELEASE}"] - contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - } + context = "${GITHUB_WORKSPACE}/official-templates/invokeai" + dockerfile = "Dockerfile" + tags = ["runpod/stable-diffusion:invoke-${RELEASE}"] + contexts = { + scripts = "container-template" + proxy = "container-template/proxy" + } } diff --git a/official-templates/oobabooga/Dockerfile b/official-templates/oobabooga/Dockerfile index 7b4e6c05..d8245a24 100644 --- a/official-templates/oobabooga/Dockerfile +++ b/official-templates/oobabooga/Dockerfile @@ -1,7 +1,7 @@ # start from runpod pytorch container ARG BASE_IMAGE=runpod/pytorch:3.10-1.13.1-116 -FROM ${BASE_IMAGE} as dev-base +FROM ${BASE_IMAGE} AS dev-base SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -37,7 +37,6 @@ COPY README.md /usr/share/nginx/html/README.md # Start Scripts COPY pre_start.sh /pre_start.sh COPY post_start.sh /post_start.sh -COPY --from=scripts start.sh / -RUN chmod +x /start.sh +COPY --chmod=755 --from=scripts start.sh / CMD [ "/start.sh" ] diff --git a/official-templates/oobabooga/docker-bake.hcl b/official-templates/oobabooga/docker-bake.hcl index 2e45c56d..093eb022 100644 --- a/official-templates/oobabooga/docker-bake.hcl +++ b/official-templates/oobabooga/docker-bake.hcl @@ -1,12 +1,17 @@ variable "RELEASE" { - default = "1.2.1" + default = "1.2.1" +} + +variable "GITHUB_WORKSPACE" { + default = "." } target "default" { - dockerfile = "Dockerfile" - tags = ["runpod/oobabooga:${RELEASE}"] - contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - } + context = "${GITHUB_WORKSPACE}/official-templates/oobabooga" + dockerfile = "Dockerfile" + tags = ["runpod/oobabooga:${RELEASE}"] + contexts = { + scripts = "container-template" + proxy = "container-template/proxy" + } } diff --git a/official-templates/pytorch/Dockerfile b/official-templates/pytorch/Dockerfile index 11d6aa83..9af066ff 100644 --- a/official-templates/pytorch/Dockerfile +++ b/official-templates/pytorch/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE +ARG BASE_IMAGE=non-existing FROM ${BASE_IMAGE} ARG TORCH @@ -58,8 +58,7 @@ COPY --from=proxy readme.html /usr/share/nginx/html/readme.html COPY README.md /usr/share/nginx/html/README.md # Start Scripts -COPY --from=scripts start.sh / -RUN chmod +x /start.sh +COPY --chmod=755 --from=scripts start.sh / # Welcome Message COPY --from=logo runpod.txt /etc/runpod.txt diff --git a/official-templates/pytorch/README.md b/official-templates/pytorch/README.md index 26c644ea..0e66adf3 100644 --- a/official-templates/pytorch/README.md +++ b/official-templates/pytorch/README.md @@ -7,7 +7,7 @@ Example: ```bash -cd containers/official-templates/pytorch +cd official-templates/pytorch docker buildx bake 280-py311-cuda1281-cudnn-devel-ubuntu2204 --set 280-py311-cuda1281-cudnn-devel-ubuntu2204.platform=linux/amd64 ``` diff --git a/official-templates/pytorch/docker-bake.hcl b/official-templates/pytorch/docker-bake.hcl index ccaad8fe..eae31e8e 100644 --- a/official-templates/pytorch/docker-bake.hcl +++ b/official-templates/pytorch/docker-bake.hcl @@ -2,16 +2,12 @@ variable "PUBLISHER" { default = "runpod" } +variable "GITHUB_WORKSPACE" { + default = "." +} + group "default" { targets = [ - ### CUDA ### - # CUDA 11.1 - "191-py39-cuda111-devel-ubuntu2004", - # CUDA 11.7.1 - "1131-py38-cuda1171-devel-ubuntu2204", - # CUDA 11.8.0 - "201-py310-cuda1180-devel-ubuntu2204", - "210-py310-cuda1180-devel-ubuntu2204", # CUDA 12.1.1 "211-py310-cuda1211-devel-ubuntu2204", "220-py310-cuda1211-devel-ubuntu2204", @@ -19,6 +15,7 @@ group "default" { # CUDA 12.4.1 "240-py311-cuda1241-devel-ubuntu2204", "251-py311-cuda1241-devel-ubuntu2204", + "260-py311-cuda1241-devel-ubuntu2204", # CUDA 12.8.1 "280-py311-cuda1281-cudnn-devel-ubuntu2204", @@ -63,18 +60,21 @@ group "cuda" { "220-py310-cuda1211-devel-ubuntu2204", "221-py310-cuda1211-devel-ubuntu2204", "240-py311-cuda1241-devel-ubuntu2204", + "251-py311-cuda1241-devel-ubuntu2204", + "260-py311-cuda1241-devel-ubuntu2204", "280-py311-cuda1281-cudnn-devel-ubuntu2204", ] } target "191-py39-cuda111-devel-ubuntu2004" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:1.9.1-py3.9-cuda11.1.1-devel-ubuntu20.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04" @@ -85,12 +85,13 @@ target "191-py39-cuda111-devel-ubuntu2004" { target "1131-py38-cuda1171-devel-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:1.13.0-py3.10-cuda11.7.1-devel-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "nvidia/cuda:11.8.0-devel-ubuntu22.04" @@ -101,12 +102,13 @@ target "1131-py38-cuda1171-devel-ubuntu2204" { target "201-py310-cuda1180-devel-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.0.1-py3.10-cuda11.8.0-devel-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "nvidia/cuda:11.8.0-devel-ubuntu22.04" @@ -117,12 +119,13 @@ target "201-py310-cuda1180-devel-ubuntu2204" { target "210-py310-cuda1180-devel-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "nvidia/cuda:11.8.0-devel-ubuntu22.04" @@ -133,12 +136,13 @@ target "210-py310-cuda1180-devel-ubuntu2204" { target "211-py310-cuda1211-devel-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.1.1-py3.10-cuda12.1.1-devel-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "nvidia/cuda:12.1.1-devel-ubuntu22.04" @@ -148,73 +152,93 @@ target "211-py310-cuda1211-devel-ubuntu2204" { } target "220-py310-cuda1211-devel-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.2.0-py3.10-cuda12.1.1-devel-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "nvidia/cuda:12.1.1-devel-ubuntu22.04" PYTHON_VERSION = "3.10" - TORCH = "pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0" + TORCH = "torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0" } } target "221-py310-cuda1211-devel-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.2.1-py3.10-cuda12.1.1-devel-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "nvidia/cuda:12.1.1-devel-ubuntu22.04" PYTHON_VERSION = "3.10" - TORCH = "torch torchvision torchaudio" + TORCH = "torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cu121" } } target "240-py311-cuda1241-devel-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.4.0-py3.11-cuda12.4.1-devel-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "nvidia/cuda:12.4.1-devel-ubuntu22.04" PYTHON_VERSION = "3.11" - TORCH = "torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124" + TORCH = "torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu124" } } - target "251-py311-cuda1241-devel-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.5.1-py3.11-cuda12.4.1-devel-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" + } + args = { + BASE_IMAGE = "nvidia/cuda:12.4.1-devel-ubuntu22.04" + PYTHON_VERSION = "3.11" + TORCH = "torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1" + } +} + +target "260-py311-cuda1241-devel-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" + dockerfile = "Dockerfile" + tags = ["${PUBLISHER}/pytorch:2.6.0-py3.11-cuda12.4.1-devel-ubuntu22.04"] + contexts = { + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "nvidia/cuda:12.4.1-devel-ubuntu22.04" PYTHON_VERSION = "3.11" - TORCH = "torch torchvision torchaudio" + TORCH = "torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0" } } target "280-py311-cuda1281-cudnn-devel-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.8.0-py3.11-cuda12.8.1-cudnn-devel-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04" @@ -226,12 +250,13 @@ target "280-py311-cuda1281-cudnn-devel-ubuntu2204" { # ROCM target "201-py38-rocm56-ubuntu2004" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.0.1-py3.8-rocm5.6-ubuntu20.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "rocm/pytorch:rocm5.6_ubuntu20.04_py3.8_pytorch_2.0.1" @@ -239,12 +264,13 @@ target "201-py38-rocm56-ubuntu2004" { } target "201-py310-rocm57-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.0.1-py3.10-rocm5.7-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "rocm/pytorch:rocm5.7_ubuntu22.04_py3.10_pytorch_2.0.1" @@ -252,12 +278,13 @@ target "201-py310-rocm57-ubuntu2204" { } target "212-py310-rocm602-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.1.2-py3.10-rocm6.0.2-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "rocm/pytorch:rocm6.0.2_ubuntu22.04_py3.10_pytorch_2.1.2" @@ -266,12 +293,13 @@ target "212-py310-rocm602-ubuntu2204" { target "211-py39-rocm60-ubuntu2004" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.1.1-py3.9-rocm6.0-ubuntu20.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "rocm/pytorch:rocm6.0_ubuntu20.04_py3.9_pytorch_2.1.1" @@ -279,12 +307,13 @@ target "211-py39-rocm60-ubuntu2004" { } target "201-py39-rocm61-ubuntu2004" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.0.1-py3.9-rocm6.1-ubuntu20.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "rocm/pytorch:rocm6.1_ubuntu20.04_py3.9_pytorch_2.0.1" @@ -292,12 +321,13 @@ target "201-py39-rocm61-ubuntu2004" { } target "212-py310-rocm61-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.1.2-py3.10-rocm6.1-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "rocm/pytorch:rocm6.1_ubuntu22.04_py3.10_pytorch_2.1.2" @@ -305,12 +335,13 @@ target "212-py310-rocm61-ubuntu2204" { } target "201-py39-rocm612-ubuntu2004" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.0.1-py3.9-rocm6.1.2-ubuntu20.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "rocm/pytorch:rocm6.1.2_ubuntu20.04_py3.9_pytorch_release-2.0.1" @@ -318,12 +349,13 @@ target "201-py39-rocm612-ubuntu2004" { } target "212-py310-rocm612-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.1.2-py3.10-rocm6.1.2-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "rocm/pytorch:rocm6.1.2_ubuntu22.04_py3.10_pytorch_release-2.1.2" @@ -331,12 +363,13 @@ target "212-py310-rocm612-ubuntu2204" { } target "240-py310-rocm610-ubuntu2204" { + context = "${GITHUB_WORKSPACE}/official-templates/pytorch" dockerfile = "Dockerfile" tags = ["${PUBLISHER}/pytorch:2.4.0-py3.10-rocm6.1.0-ubuntu22.04"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - logo = "../../container-template" + scripts = "container-template" + proxy = "container-template/proxy" + logo = "container-template" } args = { BASE_IMAGE = "rocm/pytorch:rocm6.1_ubuntu22.04_py3.10_pytorch_2.4" diff --git a/official-templates/stable-diffusion-comfyui/Dockerfile b/official-templates/stable-diffusion-comfyui/Dockerfile index e5e0463f..ca10f036 100644 --- a/official-templates/stable-diffusion-comfyui/Dockerfile +++ b/official-templates/stable-diffusion-comfyui/Dockerfile @@ -34,7 +34,6 @@ RUN mkdir -p /ComfyUI/user # Copy the README.md, extra_model_paths.yml and start script COPY README.md /usr/share/nginx/html/README.md COPY extra_model_paths.yml /ComfyUI/extra_model_paths.yml -COPY pre_start.sh /pre_start.sh -RUN chmod +x /pre_start.sh +COPY --chmod=755 pre_start.sh /pre_start.sh CMD [ "/start.sh" ] \ No newline at end of file diff --git a/official-templates/stable-diffusion-comfyui/docker-bake.hcl b/official-templates/stable-diffusion-comfyui/docker-bake.hcl index c33b2925..472bdbf1 100644 --- a/official-templates/stable-diffusion-comfyui/docker-bake.hcl +++ b/official-templates/stable-diffusion-comfyui/docker-bake.hcl @@ -1,4 +1,3 @@ -// ComfyUI Docker Bake file variable "RELEASE" { default = "6.0.0" } @@ -7,27 +6,17 @@ variable "COMFYUI_VERSION" { default = "v0.3.10" } -variable "DOCKERHUB_REPO" { - default = "runpod" -} - -variable "DOCKERHUB_IMG" { - default = "stable-diffusion" -} - -// For GitHub Actions compatibility variable "GITHUB_WORKSPACE" { default = "." } target "default" { context = "${GITHUB_WORKSPACE}/official-templates/stable-diffusion-comfyui" - dockerfile = "${GITHUB_WORKSPACE}/official-templates/stable-diffusion-comfyui/Dockerfile" - tags = ["${DOCKERHUB_REPO}/${DOCKERHUB_IMG}:comfy-ui-${RELEASE}"] - platforms = ["linux/amd64"] + dockerfile = "Dockerfile" + tags = ["runpod/stable-diffusion:comfy-ui-${RELEASE}"] contexts = { - scripts = "${GITHUB_WORKSPACE}/container-template" - proxy = "${GITHUB_WORKSPACE}/container-template/proxy" + scripts = "container-template" + proxy = "container-template/proxy" } args = { COMFYUI_VERSION = "${COMFYUI_VERSION}" diff --git a/official-templates/stable-diffusion-webui/Dockerfile b/official-templates/stable-diffusion-webui/Dockerfile index 92958b68..d72a7c1d 100644 --- a/official-templates/stable-diffusion-webui/Dockerfile +++ b/official-templates/stable-diffusion-webui/Dockerfile @@ -86,9 +86,8 @@ COPY --from=proxy readme.html /usr/share/nginx/html/readme.html COPY README.md /usr/share/nginx/html/README.md # Start Scripts -COPY pre_start.sh /pre_start.sh -COPY --from=scripts start.sh / -RUN chmod +x /start.sh && chmod +x /pre_start.sh +COPY --chmod=755 pre_start.sh /pre_start.sh +COPY --chmod=755 --from=scripts start.sh / SHELL ["/bin/bash", "--login", "-c"] CMD [ "/start.sh" ] diff --git a/official-templates/stable-diffusion-webui/docker-bake.hcl b/official-templates/stable-diffusion-webui/docker-bake.hcl index 72f72229..df683f4d 100644 --- a/official-templates/stable-diffusion-webui/docker-bake.hcl +++ b/official-templates/stable-diffusion-webui/docker-bake.hcl @@ -1,13 +1,18 @@ variable "RELEASE" { - default = "12.0.0" + default = "12.0.0" +} + +variable "GITHUB_WORKSPACE" { + default = "." } target "default" { + context = "${GITHUB_WORKSPACE}/official-templates/stable-diffusion-webui" dockerfile = "Dockerfile" tags = ["runpod/stable-diffusion:web-ui-${RELEASE}"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" + scripts = "container-template" + proxy = "container-template/proxy" } args = { WEBUI_VERSION = "v1.8.0" diff --git a/official-templates/tensorflow/Dockerfile b/official-templates/tensorflow/Dockerfile index 4d51101f..f51879ad 100644 --- a/official-templates/tensorflow/Dockerfile +++ b/official-templates/tensorflow/Dockerfile @@ -10,6 +10,7 @@ RUN apt-get update --yes && \ echo "en_US.UTF-8 UTF-8" > /etc/locale.gen # Setup Jupyter Notebook +RUN pip install --upgrade --no-cache-dir pip RUN pip install --upgrade --no-cache-dir jupyterlab ipywidgets jupyter-archive jupyter_contrib_nbextensions RUN pip install notebook==6.5.5 RUN jupyter contrib nbextension install --user && \ @@ -23,8 +24,7 @@ COPY --from=proxy readme.html /usr/share/nginx/html/readme.html COPY README.md /usr/share/nginx/html/README.md # Start Scripts -COPY --from=scripts start.sh / -RUN chmod +x /start.sh +COPY --from=scripts --chmod=755 start.sh / # Custom MOTD COPY --from=scripts runpod.txt /etc/motd diff --git a/official-templates/tensorflow/docker-bake.hcl b/official-templates/tensorflow/docker-bake.hcl index 13a8ceb2..3926da36 100644 --- a/official-templates/tensorflow/docker-bake.hcl +++ b/official-templates/tensorflow/docker-bake.hcl @@ -1,12 +1,17 @@ variable "RELEASE" { - default = "1.0.3" + default = "1.0.3" +} + +variable "GITHUB_WORKSPACE" { + default = "." } target "default" { + context = "${GITHUB_WORKSPACE}/official-templates/tensorflow" dockerfile = "Dockerfile" tags = ["runpod/tensorflow:${RELEASE}"] contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" + scripts = "container-template" + proxy = "container-template/proxy" } } diff --git a/official-templates/vs-code/Dockerfile b/official-templates/vs-code/Dockerfile index c94d502e..887701c6 100644 --- a/official-templates/vs-code/Dockerfile +++ b/official-templates/vs-code/Dockerfile @@ -46,8 +46,7 @@ COPY --from=proxy readme.html /usr/share/nginx/html/readme.html COPY README.md /usr/share/nginx/html/README.md # Start Scripts -COPY post_start.sh /post_start.sh -COPY --from=scripts start.sh / -RUN chmod +x /start.sh +COPY --chmod=755 post_start.sh /post_start.sh +COPY --chmod=755 --from=scripts start.sh / CMD [ "/start.sh" ] diff --git a/official-templates/vs-code/docker-bake.hcl b/official-templates/vs-code/docker-bake.hcl index b24d82a6..7f8f70b8 100644 --- a/official-templates/vs-code/docker-bake.hcl +++ b/official-templates/vs-code/docker-bake.hcl @@ -1,12 +1,17 @@ variable "RELEASE" { - default = "0.1.0" + default = "0.1.0" +} + +variable "GITHUB_WORKSPACE" { + default = "." } target "default" { - dockerfile = "Dockerfile" - tags = ["runpod/coder:${RELEASE}"] - contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - } + context = "${GITHUB_WORKSPACE}/official-templates/vs-code" + dockerfile = "Dockerfile" + tags = ["runpod/coder:${RELEASE}"] + contexts = { + scripts = "container-template" + proxy = "container-template/proxy" + } } diff --git a/official-templates/vscode-server/Dockerfile b/official-templates/vscode-server/Dockerfile index 36ddad86..168b64a6 100644 --- a/official-templates/vscode-server/Dockerfile +++ b/official-templates/vscode-server/Dockerfile @@ -67,8 +67,7 @@ COPY --from=proxy readme.html /usr/share/nginx/html/readme.html COPY README.md /usr/share/nginx/html/README.md # Start Scripts -COPY post_start.sh /post_start.sh -COPY --from=scripts start.sh / -RUN chmod +x /start.sh +COPY --chmod=755 post_start.sh /post_start.sh +COPY --chmod=755 --from=scripts start.sh / CMD [ "/start.sh" ] diff --git a/official-templates/vscode-server/docker-bake.hcl b/official-templates/vscode-server/docker-bake.hcl index 70cf79da..15171e79 100644 --- a/official-templates/vscode-server/docker-bake.hcl +++ b/official-templates/vscode-server/docker-bake.hcl @@ -1,16 +1,17 @@ variable "RELEASE" { - default = "0.1.2" + default = "0.1.2" } -variable "IMAGE_NAME" { - default = "runpod/vscode-server" +variable "GITHUB_WORKSPACE" { + default = "." } target "default" { - dockerfile = "Dockerfile" - tags = ["${IMAGE_NAME}:${RELEASE}"] - contexts = { - scripts = "../../container-template" - proxy = "../../container-template/proxy" - } + context = "${GITHUB_WORKSPACE}/official-templates/vscode-server" + dockerfile = "Dockerfile" + tags = ["runpod/vscode-server:${RELEASE}"] + contexts = { + scripts = "container-template" + proxy = "container-template/proxy" + } }