Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .gitlab/ci/container-boot.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,38 @@ container:boot:sculptor:
- docker ps --all
- docker compose logs sculptor -f &
- docker compose run curl-sculptor

container:boot:velorum:
extends:
- .container:boot
needs:
- generate-environment
- manifest:velorum
script:
- bundle install
- docker compose up velorum -d
- docker compose logs velorum -f &
- support/grpc_check_health --host docker:50052 --service liveness --retries 20
- support/grpc_check_health --host docker:50052 --service readiness --retries 20

container:boot:velorum:offline:
extends:
- .container:boot
needs:
- generate-environment
- manifest:velorum
script:
- docker compose up velorum-offline -d
- docker compose logs velorum-offline -f &
- |
for i in $(seq 1 30); do
STATUS=$(docker inspect --format='{{.State.Health.Status}}' $(docker compose ps -q velorum-offline) 2>/dev/null || echo "starting")
echo "Attempt $i/30: $STATUS"
if [ "$STATUS" = "healthy" ]; then
echo "Velorum booted successfully without network access"
exit 0
fi
sleep 1
done
echo "Timed out waiting for healthy status"
exit 1
15 changes: 15 additions & 0 deletions .gitlab/ci/container-build.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,3 +326,18 @@ manifest:sculptor:
PLATFORM:
- amd64
- arm64

container:velorum:
extends:
- .single-image-build-base
needs:
- generate-environment
variables:
NEED_PROJECT_DOWNLOAD: 'true'

manifest:velorum:
extends:
- .manifest-create-base
needs:
- generate-environment
- container:velorum
27 changes: 27 additions & 0 deletions container/velorum/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ARG PYTHON_VERSION=3.12
ARG UV_VERSION=0.11.16

FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv
FROM python:${PYTHON_VERSION}-slim

COPY --from=uv /uv /uvx /usr/local/bin/

WORKDIR /velorum

COPY projects/velorum/pyproject.toml projects/velorum/uv.lock ./
RUN uv sync --frozen
COPY projects/velorum/src/model.py ./src/model.py
RUN uv run python -c "from src.model import load_vector_model; load_vector_model()"

COPY projects/velorum/cli ./cli
COPY projects/velorum/src ./src
COPY projects/velorum/main.py ./main.py

ENV HF_HUB_OFFLINE=1
ENV PYTHONUNBUFFERED=1

HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
CMD uv run python -c "import grpc; from grpc_health.v1 import health_pb2, health_pb2_grpc; ch = grpc.insecure_channel('localhost:50051'); stub = health_pb2_grpc.HealthStub(ch); stub.Check(health_pb2.HealthCheckRequest(service='liveness'))" || exit 1

EXPOSE 50051
CMD ["uv", "run", "main.py"]
1 change: 1 addition & 0 deletions support/config/velorum.models.configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
15 changes: 15 additions & 0 deletions support/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,20 @@ services:
- --retry-connrefused
- http://sculptor:3000/

velorum:
image: ghcr.io/code0-tech/reticulum/ci-builds/velorum:${RETICULUM_CONTAINER_VERSION}
networks:
- boot
volumes:
- ./config/velorum.models.configuration.json:/velorum/models.configuration.json
ports:
- "50052:50051"

velorum-offline:
image: ghcr.io/code0-tech/reticulum/ci-builds/velorum:${RETICULUM_CONTAINER_VERSION}
network_mode: "none"
volumes:
- ./config/velorum.models.configuration.json:/velorum/models.configuration.json

networks:
boot:
1 change: 1 addition & 0 deletions versions/velorum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6f34f272aa434826459b76f315f9f33c70d969f4