Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add Jan AI quadlet #244

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feature: add Jan AI quadlet #244

wants to merge 1 commit into from

Conversation

p5
Copy link
Member

@p5 p5 commented Jun 9, 2024

No description provided.

@mecattaf
Copy link

Drawing inspiration from the jan-ai docker-compose filehttps://github.com/janhq/jan/blob/dev/docker-compose.yml
I think the following files should exist:

  1. Minio Service:
  • Image: minio/minio
  • Volumes: minio_data:/data
  • Ports: 9000:9000, 9001:9001
  • Environment variables: MINIO_ROOT_USER, MINIO_ROOT_PASSWORD
  • Command: server --console-address ":9001" /data
  • Healthcheck configuration
  • Network configuration
  1. createbuckets Service:
  • Image: minio/mc
  • Depends on: minio
  • Entry point script to set up Minio, create a bucket, and set its policy
  • Network configuration
  1. app_cpu_s3fs Service:
  • Image: ghcr.io/janhq/jan-server:dev-cpu-latest
  • Volumes: app_data_cpu_s3fs:/app/server/build/jan
  • Environment variables for AWS and API configuration
  • Port mapping
  • Network configuration
  1. app_gpu_s3fs Service:
  • Image: ghcr.io/janhq/jan-server:dev-cuda-12.2-latest
  • Volumes: app_data_gpu_s3fs:/app/server/build/jan
  • Environment variables for AWS and API configuration
  • Port mapping
  • NVIDIA GPU deployment configuration
  • Network configuration
  1. app_cpu_fs Service:
  • Image: ghcr.io/janhq/jan-server:dev-cpu-latest
  • Volumes: app_data_cpu_fs:/app/server/build/jan
  • Environment variable for API configuration
  • Port mapping
  • Network configuration
  1. app_gpu_fs Service:
  • Image: ghcr.io/janhq/jan-server:dev-cuda-12.2-latest
  • Volumes: app_data_gpu_fs:/app/server/build/jan
  • Environment variable for API configuration
  • NVIDIA GPU deployment configuration
  • Port mapping
  • Network configuration

@mecattaf
Copy link

I tried writing a quadlet for CPU and Filesystem option for jan ai.
However it is not getting picked up by my systemd.
What I have so far:

app_data_jan_ai_cpu_fs.volume

[app_data_jan_ai_cpu_fs.volume]
VolumeName=app_data_jan_ai_cpu_fs

createbuckets.container

[Unit]
Description=Create buckets
Wants=minio.container

[Container]
Image=minio/mc:latest
AutoUpdate=registry
ContainerName=createbuckets
Command=/bin/sh -c "
  /usr/bin/mc alias set myminio http://minio:9000 admin admin;
  /usr/bin/mc mb myminio/mybucket;
  /usr/bin/mc policy set public myminio/mybucket;
  exit 0;
"
Network=vpcbr.network

[Service]
TimeoutStartSec=900

[Install]
WantedBy=multi-user.target

jan_ai_app_cpu_fs.container

[Unit]
Description=An Jan AI App CPU/FS container
After=network-online.target

[Container]
Image=ghcr.io/janhq/jan-server:dev-cpu-latest
AutoUpdate=registry
ContainerName=jan_ai_app_cpu_fs
Environment=API_BASE_URL=http://localhost:1337
Volume=app_data_jan_ai_cpu_fs:/app/server/build/jan
Network=vpcbr.network
PublishPort=3000:3000
PublishPort=1337:1337
PublishPort=3928:3928
SecurityLabelDisable=true

[Service]
TimeoutStartSec=900

[Install]
WantedBy=multi-user.target

minio.container

[Unit]
Description=A minio server container for local S3 compatible storage
After=network-online.target

[Container]
Image=minio/minio:latest
AutoUpdate=registry
ContainerName=minio
Environment=MINIO_ROOT_USER=admin
Environment=MINIO_ROOT_PASSWORD=admin
Command=server --console-address ":9001"
Volume=minio.volume:/data:Z
Network=vpcbr.network

[Service]
TimeoutStartSec=900

[Install]
WantedBy=multi-user.target

minio.volume

[minio.volume]
VolumeName=minio-data

vpcbr.network

[vpcbr.network]
NetworkName=vpcbr

[vpcbr.network ipam.config]
  - subnet: 10.5.0.0/16
    gateway: 10.5.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants