How to create a tensorkube deployment with github actions
AmazonS3FullAccess
, AmazonEKSWorkerNodePolicy
, AmazonEC2ContainerRegistryFullAccess
and AmazonEKSClusterPolicy
policies are attached to the role you create.
actions/checkout@v4
copies your code into the workspace/<PROJECT NAME>
directory in the GitHub runner.
The path/ project name is required because tensorkube creates the deployment using the name of the folder the code is in
and the checkout action by default copies the code to the workspace
directory, which will create a clash between different
deployments because they will end up with the same deployment name.
aws-actions/configure-aws-credentials@v4
gives the GitHub runner access to your AWS resources by allowing it to assume
the role that you associated with the GitHub OIDC provider.
tensorfuse/tensorkube-github-deploy@v1
deploys your application with tensorkube. Make sure that the path
in this step and in actions/checkout@v4
is identical.
token
, Required, Your tensorkube token
. Can be found in ~/.tensorkube/token
after running tensorkube login
. We recommend storing this as a GitHub action secret.
session_id
, Required, Your tensorkube session_id
. Can be found in ~/.tensorkube/token
after running tensorkube login
. We recommend storing this as a GitHub action secret.
gpus
, Optional, Number of gpus to use. Default 0
.
gpu_type
, Optional, Type of GPU to use. Default is null
.
cpu
, Optional, Number of CPUs to use. Default is 100
milli CPU.
memory
, Optional, Amount of memory to use. Default is 200
MB.
min_scale
, Optional, Minimum number of replicas. Default is 0
.
max_scale
, Optional, Maximum number of replicas. Default is 3
.
env
, Optional, Environment in which to deploy. Default is null
.
secrets
, Optional, Secrets to be exposed as environment variables in your deployment. Default is
path
, Optional, Path where to run the command. Default is
(Not recommended to be left empty).