FROM vllm/vllm-openai:v0.9.1
ENV PYTHONUNBUFFERED=1
ENV HF_HUB_CACHE=/api/models
ENV HF_HOME=/api/models
RUN mkdir -p /api/models/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --name notebook --gpus all -d -it -p 80:8888 -v $(pwd):/home/jovyan/work -e GRANT_SUDO=no -e JUPYTER_ENABLE_LAB=yes --user root cschranz/gpu-jupyter:v1.8_cuda-12.5_ubuntu-22.04 |
sam init --runtime python3.11 --name fastapi-lambda
Choose the Quick Start: Hello World Example template.
Delete the default app.py and create your FastAPI app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -a; source .env; set +a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://docs.aws.amazon.com/ebs/latest/userguide/ebs-using-volumes.html | |
df -h | |
lsblk | |
sudo mkfs -t xfs /dev/nvme1n1 | |
sudo mkdir /workspace | |
sudo mount /dev/nvme1n1 /workspace | |
sudo cp /etc/fstab /etc/fstab.orig | |
sudo blkid | |
sudo vi /etc/fstab # copy UUID=4df3dee6-594c-4e9e-96ab-bd3a201a46b8 /workspace xfs defaults,nofail 0 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install the NVIDIA driver: | |
sudo apt-get install linux-headers-$(uname -r) | |
distribution=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.//g') | |
wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_64/cuda-keyring_1.0-1_all.deb | |
sudo dpkg -i cuda-keyring_1.0-1_all.deb | |
sudo apt update | |
sudo apt-get -y install cuda-drivers | |
Install Docker: | |
sudo apt-get install ca-certificates curl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aws_cdk import ( | |
aws_ec2 as ec2, | |
aws_ecs as ecs, | |
aws_iam as iam, | |
aws_logs as logs, | |
aws_elasticloadbalancingv2 as elbv2, | |
core, | |
) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: druid.apache.org/v1alpha1 | |
kind: Druid | |
metadata: | |
name: cluster | |
spec: | |
commonConfigMountPath: /opt/druid/conf/druid/cluster/_common | |
rollingDeploy: true | |
image: "apache/druid:0.19.0" | |
startScript: /druid.sh | |
log4j.config: |- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
s3 = boto3.resource('s3') | |
def download(bucket_name, key, filePath): | |
try: | |
s3.meta.client.download_file(bucket_name, key, filePath) | |
except ValueError as err: | |
print('Error:', err) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package wrappers | |
import play.api._ | |
import play.api.mvc._ | |
import scala.concurrent._ | |
import scala.concurrent.Future | |
import play.mvc.Http.Status | |
import ExecutionContext.Implicits.global | |
import play.libs.Akka | |
import akka.actor.{Actor, Props} |
NewerOlder