Skip to content

Instantly share code, notes, and snippets.

View sofianhamiti's full-sized avatar

Sofian Hamiti sofianhamiti

View GitHub Profile
Component Purpose
Fargate Serveless compute for LiteLLM
Aplication Load Balancer (internal) Route traffic to LiteLLM, perform health checks
Aurora PostgreSQL Serverless database for LiteLLM config, API keys, and usage metrics
Bedrock Provide access to foundation models
S3 Bucket Capture LiteLLM logs for monitoring and troubleshooting
Private VPC Subnets Isolate your LiteLLM stack from direct internet exposure
Client VPN Endpoint Provide secure, certificate-based access to LiteLLM in private subnet
OpenVPN Connect Client to connect to VPN Endpoint
# LiteLLM Configuration (see https://docs.litellm.ai/docs/proxy/config_settings)
# -----------------------------------------------------
# General application settings - Using Environment Variables from ECS Fargate
# -----------------------------------------------------
general_settings:
store_prompts_in_spend_logs: true
master_key: os.environ/LITELLM_MASTER_KEY
salt_key: os.environ/LITELLM_SALT_KEY
database_url: os.environ/DATABASE_URL
# -----------------------------------------------------
# Global Model Configuration
# -----------------------------------------------------
model_defaults: &model_defaults
model: "bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0" # Bedrock inference profile (see https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html)
tpm: 20000
rpm: 5
aws_region_name: ${AWS_REGION}
# -----------------------------------------------------
FROM public.ecr.aws/sagemaker/sagemaker-distribution:latest-cpu
# Set environment variables
ARG NB_USER="sagemaker-user"
ARG NB_UID=1000
ARG NB_GID=100
ENV MAMBA_USER=$NB_USER
USER root
{
"nameShort": "code-server",
"nameLong": "code-server",
"applicationName": "code-server",
"dataFolderName": ".code-server",
"win32MutexName": "codeserver",
"licenseName": "MIT",
"licenseUrl": "https://github.com/coder/code-server/blob/main/LICENSE",
"serverLicenseUrl": "https://github.com/microsoft/vscode/blob/main/LICENSE.txt",
"serverGreeting": [],
cd /home
apt-get update && sudo apt-get install -y gnupg software-properties-common
# Install the HashiCorp GPG key.
wget -O- https://apt.releases.hashicorp.com/gpg | \
gpg --dearmor | \
tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
# Verify the key's fingerprint.
#!/bin/bash
set -eux
source activate studio
pip install jupyterlab_s3_browser
jupyter serverextension enable --py jupyterlab_s3_browser
{
"data-root": "/home/ec2-user/SageMaker/docker",
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": [] }
}
}
FROM python:3.10.9
# INSTALL CODE-SERVER IN CONTAINER
RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=4.9.1
# POINT VS CODE (IN CONTAINER) TO THE CONFIGURATION (ON NOTEBOOK INSTANCE)
# ENV XDG_DATA_HOME=/home/SageMaker/vscode-config
{
"nameShort": "code-server",
"nameLong": "code-server",
"applicationName": "code-server",
"dataFolderName": ".code-server",
"win32MutexName": "codeserver",
"licenseName": "MIT",
"licenseUrl": "https://github.com/coder/code-server/blob/main/LICENSE",
"serverGreeting": [],
"serverLicense": [],