Skip to content

Commit

Permalink
fix: add s3 creds to python script
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-van-woerkens authored Aug 20, 2024
1 parent dca8f80 commit a503a6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ def indentString(input_string, indent_level=4):
imageId = getRequiredEnv("OVH_INSTANCE_IMAGE_ID")
region = getRequiredEnv("OVH_REGION")
authToken = getRequiredEnv("AUTH_TOKEN")
huggingFaceHubToken = os.getenv("HUGGING_FACE_HUB_TOKEN")
huggingFaceHubToken = getRequiredEnv("HUGGING_FACE_HUB_TOKEN")
s3AccessKeyId = getRequiredEnv("S3_ACCESS_KEY_ID")
s3SecretAccessKey = getRequiredEnv("S3_SECRET_ACCESS_KEY")
model = os.getenv("MODEL", "")
users = os.getenv("USERS", "")

Expand Down Expand Up @@ -114,6 +116,8 @@ def indentString(input_string, indent_level=4):
echo "CREDENTIALS='$(htpasswd -nBb user {authToken})'" >> .env
echo "HUGGING_FACE_HUB_TOKEN='{huggingFaceHubToken}'" >> .env
echo "MODEL='{model}'" >> .env
echo "S3_ACCESS_KEY_ID='{s3AccessKeyId}'" >> .env
echo "S3_SECRET_ACCESS_KEY='{s3SecretAccessKey}'" >> .env
# up docker compose services
docker compose up -d --build
Expand Down

0 comments on commit a503a6d

Please sign in to comment.