From 7611a05c44982d07465bec57658d5bf965f30ad5 Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:22:11 +0700 Subject: [PATCH] Deprecate Docker and K8s (#3219) Co-authored-by: Hien To --- .../workflows/jan-server-build-nightly.yml | 40 --- .github/workflows/jan-server-build.yml | 30 -- Dockerfile | 58 ---- Dockerfile.gpu | 85 ------ charts/server/Chart.lock | 6 - charts/server/Chart.yaml | 10 - charts/server/charts/common-0.1.2.tgz | Bin 7145 -> 0 bytes charts/server/config.json | 4 - charts/server/values.yaml | 256 ------------------ docker-compose-dev.yml | 171 ------------ docker-compose.yml | 159 ----------- 11 files changed, 819 deletions(-) delete mode 100644 .github/workflows/jan-server-build-nightly.yml delete mode 100644 .github/workflows/jan-server-build.yml delete mode 100644 Dockerfile delete mode 100644 Dockerfile.gpu delete mode 100644 charts/server/Chart.lock delete mode 100644 charts/server/Chart.yaml delete mode 100644 charts/server/charts/common-0.1.2.tgz delete mode 100644 charts/server/config.json delete mode 100644 charts/server/values.yaml delete mode 100644 docker-compose-dev.yml delete mode 100644 docker-compose.yml diff --git a/.github/workflows/jan-server-build-nightly.yml b/.github/workflows/jan-server-build-nightly.yml deleted file mode 100644 index 29e13804e..000000000 --- a/.github/workflows/jan-server-build-nightly.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Docker Builder - Nightly / Manual - -on: - push: - branches: - - main - - feature/helmchart-and-ci-jan-server - paths-ignore: - - 'README.md' - - 'docs/**' - schedule: - - cron: '0 21 * * 1,2,3' # At 8 PM UTC on Monday, Tuesday, and Wednesday which is 4 AM UTC+7 Tuesday, Wednesday, and Thursday - workflow_dispatch: - -jobs: - # Job create Update app version based on latest release tag with build number and save to output - get-update-version: - uses: ./.github/workflows/template-get-update-version.yml - - build-cpu: - uses: ./.github/workflows/template-build-jan-server.yml - permissions: - packages: write - secrets: inherit - needs: [get-update-version] - with: - dockerfile_path: ./Dockerfile - docker_image_tag: "ghcr.io/janhq/jan-server:dev-cpu-latest,ghcr.io/janhq/jan-server:dev-cpu-${{ needs.get-update-version.outputs.new_version }}" - - build-gpu: - uses: ./.github/workflows/template-build-jan-server.yml - permissions: - packages: write - secrets: inherit - needs: [get-update-version] - with: - dockerfile_path: ./Dockerfile.gpu - docker_image_tag: "ghcr.io/janhq/jan-server:dev-cuda-12.2-latest,ghcr.io/janhq/jan-server:dev-cuda-12.2-${{ needs.get-update-version.outputs.new_version }}" - - diff --git a/.github/workflows/jan-server-build.yml b/.github/workflows/jan-server-build.yml deleted file mode 100644 index 503efd298..000000000 --- a/.github/workflows/jan-server-build.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Docker Builder - Tag - -on: - push: - tags: ["v[0-9]+.[0-9]+.[0-9]+"] - -jobs: - # Job create Update app version based on latest release tag with build number and save to output - get-update-version: - uses: ./.github/workflows/template-get-update-version.yml - - build-cpu: - permissions: - packages: write - uses: ./.github/workflows/template-build-jan-server.yml - secrets: inherit - needs: [get-update-version] - with: - dockerfile_path: ./Dockerfile - docker_image_tag: "ghcr.io/janhq/jan-server:cpu-latest,ghcr.io/janhq/jan-server:cpu-${{ needs.get-update-version.outputs.new_version }}" - - build-gpu: - permissions: - packages: write - uses: ./.github/workflows/template-build-jan-server.yml - secrets: inherit - needs: [get-update-version] - with: - dockerfile_path: ./Dockerfile.gpu - docker_image_tag: "ghcr.io/janhq/jan-server:cuda-12.2-latest,ghcr.io/janhq/jan-server:cuda-12.2-${{ needs.get-update-version.outputs.new_version }}" diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index cc0a67720..000000000 --- a/Dockerfile +++ /dev/null @@ -1,58 +0,0 @@ -FROM node:20-bookworm AS base - -# 1. Install dependencies only when needed -FROM base AS builder - -# Install g++ 11 -RUN apt update && apt install -y gcc-11 g++-11 cpp-11 jq xsel && rm -rf /var/lib/apt/lists/* - -WORKDIR /app - -# Install dependencies based on the preferred package manager -COPY . ./ - -RUN export NITRO_VERSION=$(cat extensions/inference-nitro-extension/bin/version.txt) && \ - jq --arg nitroVersion $NITRO_VERSION '(.scripts."downloadnitro:linux" | gsub("\\${NITRO_VERSION}"; $nitroVersion)) | gsub("\r"; "")' extensions/inference-nitro-extension/package.json > /tmp/newcommand.txt && export NEW_COMMAND=$(sed 's/^"//;s/"$//' /tmp/newcommand.txt) && jq --arg newCommand "$NEW_COMMAND" '.scripts."downloadnitro:linux" = $newCommand' extensions/inference-nitro-extension/package.json > /tmp/package.json && mv /tmp/package.json extensions/inference-nitro-extension/package.json -RUN make install-and-build - -# # 2. Rebuild the source code only when needed -FROM base AS runner - -# Install g++ 11 -RUN apt update && apt install -y gcc-11 g++-11 cpp-11 jq xsel && rm -rf /var/lib/apt/lists/* - -WORKDIR /app - -# Copy the package.json and yarn.lock of root yarn space to leverage Docker cache -COPY --from=builder /app/package.json ./package.json -COPY --from=builder /app/node_modules ./node_modules/ -COPY --from=builder /app/yarn.lock ./yarn.lock - -# Copy the package.json, yarn.lock, and build output of server yarn space to leverage Docker cache -COPY --from=builder /app/core ./core/ -COPY --from=builder /app/server ./server/ -RUN cd core && yarn install && yarn run build - -# Copy pre-install dependencies -COPY --from=builder /app/pre-install ./pre-install/ - -# Copy the package.json, yarn.lock, and output of web yarn space to leverage Docker cache -COPY --from=builder /app/joi ./joi/ -COPY --from=builder /app/web ./web/ - -RUN yarn workspace @janhq/joi install && yarn workspace @janhq/joi build -RUN yarn workspace @janhq/web install - -RUN npm install -g serve@latest - -EXPOSE 1337 3000 3928 - -ENV JAN_API_HOST 0.0.0.0 -ENV JAN_API_PORT 1337 - -ENV API_BASE_URL http://localhost:1337 - -CMD ["sh", "-c", "export NODE_ENV=production && yarn workspace @janhq/web build && cd web && npx serve out & cd server && node build/main.js"] - -# docker build -t jan . -# docker run -p 1337:1337 -p 3000:3000 -p 3928:3928 jan diff --git a/Dockerfile.gpu b/Dockerfile.gpu deleted file mode 100644 index 41f9a898b..000000000 --- a/Dockerfile.gpu +++ /dev/null @@ -1,85 +0,0 @@ -# Please change the base image to the appropriate CUDA version base on NVIDIA Driver Compatibility -# Run nvidia-smi to check the CUDA version and the corresponding driver version -# Then update the base image to the appropriate CUDA version refer https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda/tags - -FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 AS base - -# 1. Install dependencies only when needed -FROM base AS builder - -# Install g++ 11 -RUN apt update && apt install -y gcc-11 g++-11 cpp-11 jq xsel curl gnupg make python3-dev && curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt install nodejs -y && rm -rf /var/lib/apt/lists/* - -# Update alternatives for GCC and related tools -RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 \ - --slave /usr/bin/g++ g++ /usr/bin/g++-11 \ - --slave /usr/bin/gcov gcov /usr/bin/gcov-11 \ - --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \ - --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 && \ - update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-11 110 - -RUN npm install -g yarn - -WORKDIR /app - -# Install dependencies based on the preferred package manager -COPY . ./ - -RUN export NITRO_VERSION=$(cat extensions/inference-nitro-extension/bin/version.txt) && \ - jq --arg nitroVersion $NITRO_VERSION '(.scripts."downloadnitro:linux" | gsub("\\${NITRO_VERSION}"; $nitroVersion)) | gsub("\r"; "")' extensions/inference-nitro-extension/package.json > /tmp/newcommand.txt && export NEW_COMMAND=$(sed 's/^"//;s/"$//' /tmp/newcommand.txt) && jq --arg newCommand "$NEW_COMMAND" '.scripts."downloadnitro:linux" = $newCommand' extensions/inference-nitro-extension/package.json > /tmp/package.json && mv /tmp/package.json extensions/inference-nitro-extension/package.json -RUN make install-and-build - -# # 2. Rebuild the source code only when needed -FROM base AS runner - -# Install g++ 11 -RUN apt update && apt install -y gcc-11 g++-11 cpp-11 jq xsel curl gnupg make python3-dev && curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get install nodejs -y && rm -rf /var/lib/apt/lists/* - -# Update alternatives for GCC and related tools -RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 \ - --slave /usr/bin/g++ g++ /usr/bin/g++-11 \ - --slave /usr/bin/gcov gcov /usr/bin/gcov-11 \ - --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \ - --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 && \ - update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-11 110 - -RUN npm install -g yarn - -WORKDIR /app - -# Copy the package.json and yarn.lock of root yarn space to leverage Docker cache -COPY --from=builder /app/package.json ./package.json -COPY --from=builder /app/node_modules ./node_modules/ -COPY --from=builder /app/yarn.lock ./yarn.lock - -# Copy the package.json, yarn.lock, and build output of server yarn space to leverage Docker cache -COPY --from=builder /app/core ./core/ -COPY --from=builder /app/server ./server/ -RUN cd core && yarn install && yarn run build - -# Copy pre-install dependencies -COPY --from=builder /app/pre-install ./pre-install/ - -# Copy the package.json, yarn.lock, and output of web yarn space to leverage Docker cache -COPY --from=builder /app/joi ./joi/ -COPY --from=builder /app/web ./web/ - -RUN yarn workspace @janhq/joi install && yarn workspace @janhq/joi build -RUN yarn workspace @janhq/web install - -RUN npm install -g serve@latest - -EXPOSE 1337 3000 3928 - -ENV LD_LIBRARY_PATH=/usr/local/cuda/targets/x86_64-linux/lib:/usr/local/cuda-12.0/compat${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - -ENV JAN_API_HOST 0.0.0.0 -ENV JAN_API_PORT 1337 - -ENV API_BASE_URL http://localhost:1337 - -CMD ["sh", "-c", "export NODE_ENV=production && yarn workspace @janhq/web build && cd web && npx serve out & cd server && node build/main.js"] - -# pre-requisites: nvidia-docker -# docker build -t jan-gpu . -f Dockerfile.gpu -# docker run -p 1337:1337 -p 3000:3000 -p 3928:3928 --gpus all jan-gpu diff --git a/charts/server/Chart.lock b/charts/server/Chart.lock deleted file mode 100644 index 915788d61..000000000 --- a/charts/server/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: oci://ghcr.io/janhq/charts - version: 0.1.2 -digest: sha256:35e98bde174130787755b0f8ea2359b7b6790d965a7157c2f7cabf1bc8c04471 -generated: "2024-02-20T16:20:37.6530108+07:00" diff --git a/charts/server/Chart.yaml b/charts/server/Chart.yaml deleted file mode 100644 index fb2e1c91b..000000000 --- a/charts/server/Chart.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v2 -name: jan-server -description: A Helm chart for Kubernetes -type: application -version: 0.1.0 -appVersion: '1.0.0' -dependencies: - - name: common - version: 0.1.2 # common-chart-version - repository: oci://ghcr.io/janhq/charts diff --git a/charts/server/charts/common-0.1.2.tgz b/charts/server/charts/common-0.1.2.tgz deleted file mode 100644 index 946617eabb1325627dba2549196eb08b2afe4abd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7145 zcmVDc zVQyr3R8em|NM&qo0PKBfbK|zMXg>2-;K_69%;XJe$?HU~@~RwLnW$n*Dob(hxv7*3 zA|VMeMQ{L6w&M8y_FLFUaFgU^JXwSfGZxWkG#Ws6186jSGM|%Z_jCp+_m*%Te)aOH z*=#nC4i4o1&1SRsf3tPm`l@wscy!o2Y98(#f7NX59USj{1)86MmQqR>hxDuFv+F80 z?k|#HjIR)7m_%)`*mGbUr$1X>>&R<50b)MIF_+&?zz-;#178dmFd-EDn2ZsP5J$|3 z;2gDq8c+^j#;6To9EaG4qO7wpc$;3!+jG8j!?#H$J^vRlOc47_0$|PjKi=OvD$f7o zgVuKbzed7yI7K5k71OfmwVWMr)(5@*2%P?K()-u}qaQlpyxZ%5lkfUh9S>Zb{MZ2} z=jS?q2)^r__kVVr9q=(EV;F*X;Y+~)!w}pOdJ_^DIPt=7I{=^vjzbi*!32g3IRGe; z(P%gTK;K7uteP>dLMADX zBEqGNV{LH%-~g}#P7_K|#KYx#z-O3gfk~op30M-xgmSPC#?Ze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^45YvzAzuWbJ}kGA&ztEA6t|3B;Px2JoA7hf~4muaz|3J2)`3~yQC25k0u72tv&R?NXZjbpo;5e9^SZ2jROx7U1-LRY+mgHHF9Iixp+z z9dbdvw)W%8qzd_;3zGi|`#-INy~A?+udV;ztE4~4{?F?wi%P3j?}cw5+c$Yf;??$d zxN&NGbiQ5EAg7fv?++{kJTbC4doJYIV} zjoJCli7!1VUoq9m|5v>K**ZKZ%KyXW@!?kfzed{1|EJ6U&n5SZxBASKlotw8U zhz&y=ZPm#aQYU}rwMw1**N=?8h#FY8|9fy;ivN4CjsN>Psj&ZB{TOWRPVg`XzFBm! z>L(aqJi1t+B`0?dA@;yf} zFV;sE%LkD#QO2$i<=EdW#+WfG7GFBP82@rUBS{=Uj&xu|iAH_7Ab~=bJ)PgM`zM3S zpZnRE$~)4cWFE3+4_f^x|8oB>n*>_^dovWyv3!5;&B>3cv? z2svIL8I;5N4x_-?0TG%?qYJ!^DVpFr6ezRp|Ge`+KMI$CM6#qH3B-tk5J$*!ytCo8 z3b?uhPUVmVSEoY|V9FeCiutbmSCQ{{rrW9Msc3~!vTJw6wI6N;zK*Z - /bin/sh -c " - /usr/bin/mc alias set myminio http://minio:9000 minioadmin minioadmin; - /usr/bin/mc mb myminio/mybucket; - /usr/bin/mc policy set public myminio/mybucket; - exit 0; - " - networks: - vpcbr: - - # app_cpu service for running the CPU version of the application - app_cpu_s3fs: - image: jan:latest - volumes: - - app_data_cpu_s3fs:/app/server/build/jan - build: - context: . - dockerfile: Dockerfile - environment: - # Set the AWS access key, secret access key, bucket name, endpoint, and region for app_cpu - AWS_ACCESS_KEY_ID: minioadmin - AWS_SECRET_ACCESS_KEY: minioadmin - S3_BUCKET_NAME: mybucket - AWS_ENDPOINT: http://10.5.0.2:9000 - AWS_REGION: us-east-1 - API_BASE_URL: http://localhost:1337 - restart: always - profiles: - - cpu-s3fs - ports: - - '3000:3000' - - '1337:1337' - - '3928:3928' - networks: - vpcbr: - ipv4_address: 10.5.0.3 - - # app_gpu service for running the GPU version of the application - app_gpu_s3fs: - deploy: - resources: - reservations: - devices: - - driver: nvidia - count: all - capabilities: [gpu] - image: jan-gpu:latest - volumes: - - app_data_gpu_s3fs:/app/server/build/jan - build: - context: . - dockerfile: Dockerfile.gpu - restart: always - environment: - # Set the AWS access key, secret access key, bucket name, endpoint, and region for app_gpu - AWS_ACCESS_KEY_ID: minioadmin - AWS_SECRET_ACCESS_KEY: minioadmin - S3_BUCKET_NAME: mybucket - AWS_ENDPOINT: http://10.5.0.2:9000 - AWS_REGION: us-east-1 - API_BASE_URL: http://localhost:1337 - profiles: - - gpu-s3fs - ports: - - '3000:3000' - - '1337:1337' - - '3928:3928' - networks: - vpcbr: - ipv4_address: 10.5.0.4 - - app_cpu_fs: - image: jan:latest - volumes: - - app_data_cpu_fs:/app/server/build/jan - build: - context: . - dockerfile: Dockerfile - environment: - API_BASE_URL: http://localhost:1337 - restart: always - profiles: - - cpu-fs - ports: - - '3000:3000' - - '1337:1337' - - '3928:3928' - networks: - vpcbr: - ipv4_address: 10.5.0.5 - - # app_gpu service for running the GPU version of the application - app_gpu_fs: - deploy: - resources: - reservations: - devices: - - driver: nvidia - count: all - capabilities: [gpu] - image: jan-gpu:latest - volumes: - - app_data_gpu_fs:/app/server/build/jan - build: - context: . - dockerfile: Dockerfile.gpu - restart: always - environment: - API_BASE_URL: http://localhost:1337 - profiles: - - gpu-fs - ports: - - '3000:3000' - - '1337:1337' - - '3928:3928' - networks: - vpcbr: - ipv4_address: 10.5.0.6 - -volumes: - minio_data: - app_data_cpu_s3fs: - app_data_gpu_s3fs: - app_data_cpu_fs: - app_data_gpu_fs: - -networks: - vpcbr: - driver: bridge - ipam: - config: - - subnet: 10.5.0.0/16 - gateway: 10.5.0.1 -# Usage: -# - Run 'docker compose -f docker-compose-dev.yml --profile cpu-s3fs up -d' to start the app_cpu service -# - Run 'docker compose -f docker-compose-dev.yml --profile gpu-s3fs up -d' to start the app_gpu service -# - Run 'docker compose -f docker-compose-dev.yml --profile cpu-fs up -d' to start the app_cpu service -# - Run 'docker compose -f docker-compose-dev.yml --profile gpu-fs up -d' to start the app_gpu service diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 1e5660c12..000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,159 +0,0 @@ -# Docker Compose file for setting up Minio, createbuckets, app_cpu, and app_gpu services - -version: '3.7' - -services: - # Minio service for object storage - minio: - image: minio/minio - volumes: - - minio_data:/data - ports: - - '9000:9000' - - '9001:9001' - environment: - # Set the root user and password for Minio - MINIO_ROOT_USER: minioadmin # This acts as AWS_ACCESS_KEY - MINIO_ROOT_PASSWORD: minioadmin # This acts as AWS_SECRET_ACCESS_KEY - command: server --console-address ":9001" /data - restart: always - healthcheck: - test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live'] - interval: 30s - timeout: 20s - retries: 3 - networks: - vpcbr: - ipv4_address: 10.5.0.2 - - # createbuckets service to create a bucket and set its policy - createbuckets: - image: minio/mc - depends_on: - - minio - entrypoint: > - /bin/sh -c " - /usr/bin/mc alias set myminio http://minio:9000 minioadmin minioadmin; - /usr/bin/mc mb myminio/mybucket; - /usr/bin/mc policy set public myminio/mybucket; - exit 0; - " - networks: - vpcbr: - - # app_cpu service for running the CPU version of the application - app_cpu_s3fs: - volumes: - - app_data_cpu_s3fs:/app/server/build/jan - image: ghcr.io/janhq/jan-server:dev-cpu-latest - environment: - # Set the AWS access key, secret access key, bucket name, endpoint, and region for app_cpu - AWS_ACCESS_KEY_ID: minioadmin - AWS_SECRET_ACCESS_KEY: minioadmin - S3_BUCKET_NAME: mybucket - AWS_ENDPOINT: http://10.5.0.2:9000 - AWS_REGION: us-east-1 - API_BASE_URL: http://localhost:1337 - restart: always - profiles: - - cpu-s3fs - ports: - - '3000:3000' - - '1337:1337' - - '3928:3928' - networks: - vpcbr: - ipv4_address: 10.5.0.3 - - # app_gpu service for running the GPU version of the application - app_gpu_s3fs: - deploy: - resources: - reservations: - devices: - - driver: nvidia - count: all - capabilities: [gpu] - image: ghcr.io/janhq/jan-server:dev-cuda-12.2-latest - volumes: - - app_data_gpu_s3fs:/app/server/build/jan - restart: always - environment: - # Set the AWS access key, secret access key, bucket name, endpoint, and region for app_gpu - AWS_ACCESS_KEY_ID: minioadmin - AWS_SECRET_ACCESS_KEY: minioadmin - S3_BUCKET_NAME: mybucket - AWS_ENDPOINT: http://10.5.0.2:9000 - AWS_REGION: us-east-1 - API_BASE_URL: http://localhost:1337 - profiles: - - gpu-s3fs - ports: - - '3000:3000' - - '1337:1337' - - '3928:3928' - networks: - vpcbr: - ipv4_address: 10.5.0.4 - - app_cpu_fs: - image: ghcr.io/janhq/jan-server:dev-cpu-latest - volumes: - - app_data_cpu_fs:/app/server/build/jan - environment: - API_BASE_URL: http://localhost:1337 - restart: always - profiles: - - cpu-fs - ports: - - '3000:3000' - - '1337:1337' - - '3928:3928' - networks: - vpcbr: - ipv4_address: 10.5.0.5 - - # app_gpu service for running the GPU version of the application - app_gpu_fs: - deploy: - resources: - reservations: - devices: - - driver: nvidia - count: all - capabilities: [gpu] - image: ghcr.io/janhq/jan-server:dev-cuda-12.2-latest - volumes: - - app_data_gpu_fs:/app/server/build/jan - restart: always - environment: - API_BASE_URL: http://localhost:1337 - profiles: - - gpu-fs - ports: - - '3000:3000' - - '1337:1337' - - '3928:3928' - networks: - vpcbr: - ipv4_address: 10.5.0.6 - -volumes: - minio_data: - app_data_cpu_s3fs: - app_data_gpu_s3fs: - app_data_cpu_fs: - app_data_gpu_fs: - -networks: - vpcbr: - driver: bridge - ipam: - config: - - subnet: 10.5.0.0/16 - gateway: 10.5.0.1 -# Usage: -# - Run 'docker compose --profile cpu-s3fs up -d' to start the app_cpu service -# - Run 'docker compose --profile gpu-s3fs up -d' to start the app_gpu service -# - Run 'docker compose --profile cpu-fs up -d' to start the app_cpu service -# - Run 'docker compose --profile gpu-fs up -d' to start the app_gpu service