Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Add a step to your workflow that uses this action:

```yml
- name: Setup Cog
uses: replicate/setup-cog@v1
uses: replicate/setup-cog@v2
with:
token: ${{ secrets.REPLICATE_API_TOKEN }}

Expand All @@ -33,13 +33,13 @@ This following inputs can be specified using the `with` keyword:

The version of Cog to install in the form `vX.Y.Z`. See [Cog releases](https://github.com/replicate/cog/releases) for a list of available versions.

Defaults to `v0.8.6`.
Defaults to `v0.9.7`.

```yml
- name: Setup Cog
uses: replicate/setup-cog@v1
uses: replicate/setup-cog@v2
with:
cog-version: "v0.9.5"
cog-version: "v0.9.8-alpha"
```

#### `token`
Expand All @@ -48,7 +48,7 @@ Your Replicate API token. If set, the Action will automatically authenticate to

```yml
- name: Setup Cog
uses: replicate/setup-cog@v1
uses: replicate/setup-cog@v2
with:
token: ${{ secrets.REPLICATE_API_TOKEN }}
```
Expand All @@ -61,9 +61,9 @@ Install NVIDIA CUDA Toolkit. Defaults to `true`. This flag can be set to `false`

```yml
- name: Setup Cog
uses: replicate/setup-cog@v1
uses: replicate/setup-cog@v2
with:
install-cuda: false
install-cuda: true
```

## Example: Manual Deployment
Expand All @@ -88,7 +88,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Cog
uses: replicate/setup-cog@v1
uses: replicate/setup-cog@v2
with:
token: ${{ secrets.REPLICATE_API_TOKEN }}

Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Cog
uses: replicate/setup-cog@v1
uses: replicate/setup-cog@v2
with:
token: ${{ secrets.REPLICATE_API_TOKEN }}

Expand Down Expand Up @@ -149,5 +149,5 @@ jobs:
uses: actions/checkout@v3

- name: Setup Cog
uses: replicate/setup-cog@v1
uses: replicate/setup-cog@v2
```
12 changes: 7 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ inputs:
cog-version:
description: "The version of Cog to install"
required: false
default: "v0.8.6"
default: "v0.9.7"
install-cuda:
description: "Install NVIDIA CUDA Toolkit to build GPU-bound containers."
required: false
default: 'true'

default: 'false'
options:
- true
- false

runs:
using: "composite"
Expand All @@ -27,7 +29,7 @@ runs:
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

- name: Install NVIDIA CUDA Toolkit
if: ${{ inputs.install-cuda == 'true' }}
if: inputs.install-cuda == true || inputs.install-cuda == 'true'
uses: Jimver/cuda-toolkit@dc0ca7bb29c5a92f7a963d3d5c93f8d59765136a # v0.2.14

- name: Setup Cog
Expand All @@ -39,7 +41,7 @@ runs:

- name: Log in to Replicate
shell: bash
if: ${{ inputs.token != '' }}
if: inputs.token != ''
env:
REPLICATE_API_TOKEN: ${{ inputs.token }}
run: |
Expand Down