Secrets
Secrets on Banana let you pass private data to your model at build time or runtime
Getting Started with Secrets
Navigate to your models setting page and add secrets in the Build Arguments section
Next, you must modify the Dockerfile to access them
In the example below we fetch a stable diffusion 1.5 model checkpoint URL and hugginface auth token using ARG commands and passing the names of the build argument keys we provided in the model settings above
ARG commands only make the variable accessible from within the docker build context, so in addition we add the lines
ENV MODEL_URL=${MODEL_URL}
andENV HF_TOKEN=${HF_TOKEN}
These lines pass the build arguments to our potassium runtime as environment variables.
Once your potassium app is running you can access these env vars using any standard library call such as os.getenv('MODEL_URL')
in the case of python
Last updated