diff --git a/.gitignore b/.gitignore index c7e0aed9..ba2b4678 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # generated dockerfiles container/sagittarius/Dockerfile container/sculptor/Dockerfile +container/velorum/Dockerfile # downloaded projects projects diff --git a/.gitlab/ci/container-boot.gitlab-ci.yml b/.gitlab/ci/container-boot.gitlab-ci.yml index 9bb54bd1..d680148d 100644 --- a/.gitlab/ci/container-boot.gitlab-ci.yml +++ b/.gitlab/ci/container-boot.gitlab-ci.yml @@ -156,6 +156,15 @@ container:boot:velorum: needs: - generate-environment - manifest:velorum + parallel: + matrix: + - VELORUM_VARIANT: + - ce + - ee + - cloud + PLATFORM: + - amd64 + - arm64 script: - bundle install - docker compose up velorum -d @@ -169,6 +178,15 @@ container:boot:velorum:offline: needs: - generate-environment - manifest:velorum + parallel: + matrix: + - VELORUM_VARIANT: + - ce + - ee + - cloud + PLATFORM: + - amd64 + - arm64 script: - docker compose up velorum-offline -d - docker compose logs velorum-offline -f & diff --git a/.gitlab/ci/container-build.gitlab-ci.yml b/.gitlab/ci/container-build.gitlab-ci.yml index 1a4c60ab..86ea9c93 100644 --- a/.gitlab/ci/container-build.gitlab-ci.yml +++ b/.gitlab/ci/container-build.gitlab-ci.yml @@ -297,15 +297,36 @@ manifest:sculptor: container:velorum: extends: - - .single-image-build-base + - .variant-image-build-base needs: - generate-environment variables: NEED_PROJECT_DOWNLOAD: 'true' + parallel: + matrix: + - VARIANT: + - ce + - ee + - cloud + PLATFORM: + - amd64 + - arm64 manifest:velorum: extends: - .manifest-create-base + parallel: + matrix: + - VARIANT: + - ce + - ee + - cloud needs: - generate-environment - - container:velorum + - job: container:velorum + parallel: + matrix: + - VARIANT: [ '$[[ matrix.VARIANT ]]' ] + PLATFORM: + - amd64 + - arm64 diff --git a/container/velorum/Dockerfile b/container/velorum/Dockerfile.erb similarity index 82% rename from container/velorum/Dockerfile rename to container/velorum/Dockerfile.erb index 81eb752c..69113175 100644 --- a/container/velorum/Dockerfile +++ b/container/velorum/Dockerfile.erb @@ -16,6 +16,16 @@ RUN uv run python -c "from src.model import load_vector_model; load_vector_model COPY projects/velorum/few_shots.configuration.json ./few_shots.configuration.json COPY projects/velorum/cli ./cli COPY projects/velorum/src ./src + +<% if ee? || cloud? %> +COPY projects/velorum/packages/ee ./packages/ee +<% end %> + +<% if cloud? %> +COPY projects/velorum/packages/cloud ./packages/cloud +<% end %> + +COPY projects/velorum/edition.py ./edition.py COPY projects/velorum/main.py ./main.py ENV HF_HUB_OFFLINE=1 diff --git a/container/velorum/renderDockerfile b/container/velorum/renderDockerfile new file mode 100755 index 00000000..73f7cfd0 --- /dev/null +++ b/container/velorum/renderDockerfile @@ -0,0 +1,19 @@ +#!/usr/bin/env ruby + +require 'erb' +require 'fileutils' + +def ee? + ENV['VARIANT'].eql?('ee') +end + +def cloud? + ENV['VARIANT'].eql?('cloud') +end + +def variant + ENV['VARIANT'] +end + +template = ERB.new(File.read("#{__dir__}/Dockerfile.erb"), trim_mode: '-') +File.write("#{__dir__}/Dockerfile", template.result) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 0cad241b..aef48e6c 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -141,7 +141,7 @@ services: - ide velorum: - image: ${IMAGE_REGISTRY}/velorum:${IMAGE_TAG} + image: ${IMAGE_REGISTRY}/velorum:${IMAGE_TAG}-${IMAGE_EDITION} depends_on: config-generator: condition: service_completed_successfully diff --git a/support/docker-compose.yml b/support/docker-compose.yml index af35d422..2bb2fd76 100644 --- a/support/docker-compose.yml +++ b/support/docker-compose.yml @@ -137,7 +137,7 @@ services: - http://sculptor:3000/ velorum: - image: ghcr.io/code0-tech/reticulum/ci-builds/velorum:${RETICULUM_CONTAINER_VERSION} + image: ghcr.io/code0-tech/reticulum/ci-builds/velorum:${RETICULUM_CONTAINER_VERSION}-${VELORUM_VARIANT} networks: - boot volumes: @@ -146,7 +146,7 @@ services: - "50052:50051" velorum-offline: - image: ghcr.io/code0-tech/reticulum/ci-builds/velorum:${RETICULUM_CONTAINER_VERSION} + image: ghcr.io/code0-tech/reticulum/ci-builds/velorum:${RETICULUM_CONTAINER_VERSION}-${VELORUM_VARIANT} network_mode: "none" volumes: - ./config/velorum.models.configuration.json:/velorum/models.configuration.json diff --git a/versions/velorum b/versions/velorum index 9a109bf4..eb7827ad 100644 --- a/versions/velorum +++ b/versions/velorum @@ -1 +1 @@ -2161431976562194ee0b333a5ef9fc35d779246e +84709b7b3bf5202ffb6ffbcf8ef290a8b478d9ca \ No newline at end of file