From 846221218c0e74314ed89cd12187c10a7671a2b8 Mon Sep 17 00:00:00 2001 From: Luis Seabra Date: Fri, 29 Sep 2023 08:07:10 +0100 Subject: [PATCH 1/2] optional cuda toolkit install --- README.md | 2 +- action.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ed8fc63..ad134e5 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ This following inputs can be specified using the `with` keyword: - `cog-version`: The version of Cog to install in the form `vX.Y.Z`. See [Cog releases] for a list of available versions. Defaults to `v0.8.0-beta3` (a prerelease version with support for pushing GPU models from runners that don't have a GPU!) - `token`: Your Replicate API token. If set, the Action will automatically authenticate to Replicate using `cog login`. To use this feature, get a token from [replicate.com/account](https://replicate.com/account), then create a repository secret named `REPLICATE_API_TOKEN` in your GitHub repo's settings. - +- `install-cuda`: Install NVIDIA CUDA Toolkit. Defautls to `true`. This flag can be set to `false` when building Cog containers that don't require GPU. ## Example: Manual Deployment diff --git a/action.yml b/action.yml index 5b90708..c406af8 100644 --- a/action.yml +++ b/action.yml @@ -15,6 +15,11 @@ inputs: required: false # This version of Cog adds support for `cog run` on non-GPU environments (like GitHub Actions' default runners) default: "v0.8.0-beta3" + install-cuda: + description: "Install NVIDIA CUDA Toolkit to build GPU-bound containers." + required: false + default: 'true' + runs: using: "composite" @@ -23,6 +28,7 @@ runs: uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # v2.7.0 - name: Install NVIDIA CUDA Toolkit + if: ${{ inputs.install-cuda == 'true' }} uses: Jimver/cuda-toolkit@6974ecc945579a89135a1e1d9eac96ec361a1171 # v0.2.10 - name: Setup Cog From ba2574b0fb404e75b3761c5475decf557c25cc8e Mon Sep 17 00:00:00 2001 From: Luis Seabra Date: Tue, 3 Oct 2023 07:52:01 +0100 Subject: [PATCH 2/2] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad134e5..0a211bd 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ This following inputs can be specified using the `with` keyword: - `cog-version`: The version of Cog to install in the form `vX.Y.Z`. See [Cog releases] for a list of available versions. Defaults to `v0.8.0-beta3` (a prerelease version with support for pushing GPU models from runners that don't have a GPU!) - `token`: Your Replicate API token. If set, the Action will automatically authenticate to Replicate using `cog login`. To use this feature, get a token from [replicate.com/account](https://replicate.com/account), then create a repository secret named `REPLICATE_API_TOKEN` in your GitHub repo's settings. -- `install-cuda`: Install NVIDIA CUDA Toolkit. Defautls to `true`. This flag can be set to `false` when building Cog containers that don't require GPU. +- `install-cuda`: Install NVIDIA CUDA Toolkit. Defaults to `true`. This flag can be set to `false` when building Cog containers that don't require GPU. ## Example: Manual Deployment