Skip to content

Commit 298d551

Browse files
committed
Setup builds for velorum
1 parent 7954e88 commit 298d551

6 files changed

Lines changed: 94 additions & 0 deletions

File tree

.gitlab/ci/container-boot.gitlab-ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,38 @@ container:boot:sculptor:
158158
- docker ps --all
159159
- docker compose logs sculptor -f &
160160
- docker compose run curl-sculptor
161+
162+
container:boot:velorum:
163+
extends:
164+
- .container:boot
165+
needs:
166+
- generate-environment
167+
- manifest:velorum
168+
script:
169+
- bundle install
170+
- docker compose up velorum -d
171+
- docker compose logs velorum -f &
172+
- support/grpc_check_health --host docker:50052 --service liveness --retries 20
173+
- support/grpc_check_health --host docker:50052 --service readiness --retries 20
174+
175+
container:boot:velorum:offline:
176+
extends:
177+
- .container:boot
178+
needs:
179+
- generate-environment
180+
- manifest:velorum
181+
script:
182+
- docker compose up velorum-offline -d
183+
- docker compose logs velorum-offline -f &
184+
- |
185+
for i in $(seq 1 30); do
186+
STATUS=$(docker inspect --format='{{.State.Health.Status}}' $(docker compose ps -q velorum-offline) 2>/dev/null || echo "starting")
187+
echo "Attempt $i/30: $STATUS"
188+
if [ "$STATUS" = "healthy" ]; then
189+
echo "Velorum booted successfully without network access"
190+
exit 0
191+
fi
192+
sleep 1
193+
done
194+
echo "Timed out waiting for healthy status"
195+
exit 1

.gitlab/ci/container-build.gitlab-ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,3 +326,18 @@ manifest:sculptor:
326326
PLATFORM:
327327
- amd64
328328
- arm64
329+
330+
container:velorum:
331+
extends:
332+
- .single-image-build-base
333+
needs:
334+
- generate-environment
335+
variables:
336+
NEED_PROJECT_DOWNLOAD: 'true'
337+
338+
manifest:velorum:
339+
extends:
340+
- .manifest-create-base
341+
needs:
342+
- generate-environment
343+
- container:velorum

container/velorum/Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
ARG PYTHON_VERSION=3.12
2+
ARG UV_VERSION=0.11.16
3+
4+
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv
5+
FROM python:${PYTHON_VERSION}-slim
6+
7+
COPY --from=uv /uv /uvx /usr/local/bin/
8+
9+
WORKDIR /velorum
10+
11+
COPY projects/velorum/pyproject.toml projects/velorum/uv.lock ./
12+
RUN uv sync --frozen
13+
COPY projects/velorum/src/model.py ./src/model.py
14+
RUN uv run python -c "from src.model import load_vector_model; load_vector_model()"
15+
16+
COPY projects/velorum/cli ./cli
17+
COPY projects/velorum/src ./src
18+
COPY projects/velorum/main.py ./main.py
19+
20+
ENV HF_HUB_OFFLINE=1
21+
ENV PYTHONUNBUFFERED=1
22+
23+
HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
24+
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
25+
26+
EXPOSE 50051
27+
CMD ["uv", "run", "main.py"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

support/docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,20 @@ services:
147147
- --retry-connrefused
148148
- http://sculptor:3000/
149149

150+
velorum:
151+
image: ghcr.io/code0-tech/reticulum/ci-builds/velorum:${RETICULUM_CONTAINER_VERSION}
152+
networks:
153+
- boot
154+
volumes:
155+
- ./config/velorum.models.configuration.json:/velorum/models.configuration.json
156+
ports:
157+
- "50052:50051"
158+
159+
velorum-offline:
160+
image: ghcr.io/code0-tech/reticulum/ci-builds/velorum:${RETICULUM_CONTAINER_VERSION}
161+
network_mode: "none"
162+
volumes:
163+
- ./config/velorum.models.configuration.json:/velorum/models.configuration.json
164+
150165
networks:
151166
boot:

versions/velorum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6f34f272aa434826459b76f315f9f33c70d969f4

0 commit comments

Comments
 (0)