Build both packages to one container, bump version

This commit is contained in:
Cyber MacGeddon 2024-09-30 13:58:39 +01:00
parent b84124f177
commit 06ac734a33
4 changed files with 21 additions and 15 deletions

View file

@ -21,7 +21,7 @@ RUN pip3 install anthropic boto3 cohere openai google-cloud-aiplatform ollama \
pip3 cache purge
# ----------------------------------------------------------------------------
# Build a container which contains the built Python package. The build
# Build a container which contains the built Python packages. The build
# creates a bunch of left-over cruft, a separate phase means this is only
# needed to support package build
# ----------------------------------------------------------------------------
@ -30,12 +30,18 @@ FROM ai AS build
env PACKAGE_VERSION=0.0.0
COPY setup.py /root/build/
COPY README.md /root/build/
COPY scripts/ /root/build/scripts/
COPY trustgraph/ root/build/trustgraph/
COPY trustgraph-core/ /root/build/trustgraph-core/
COPY README.md /root/build/trustgraph-core/
RUN (cd /root/build && pip3 wheel -w /root/wheels --no-deps .)
COPY trustgraph-embeddings-hf/ /root/build/trustgraph-embeddings-hf/
COPY README.md /root/build/trustgraph-embeddings-hf/
WORKDIR /root/build/
RUN pip3 wheel -w /root/wheels/ --no-deps ./trustgraph-core/
RUN pip3 wheel -w /root/wheels/ --no-deps ./trustgraph-embeddings-hf/
RUN ls /root/wheels
# ----------------------------------------------------------------------------
# Finally, the target container. Start with base and add the package.
@ -45,7 +51,9 @@ FROM ai
COPY --from=build /root/wheels /root/wheels
RUN pip3 install /root/wheels/trustgraph-* && \
RUN \
pip3 install /root/wheels/trustgraph_core-* && \
pip3 install /root/wheels/trustgraph_embeddings_hf-* && \
pip3 cache purge && \
rm -rf /root/wheels

View file

@ -1,17 +1,15 @@
# VERSION=$(shell git describe | sed 's/^v//')
VERSION=0.11.5
VERSION=0.11.6
DOCKER=podman
all: pkgs
all: container
pkgs:
pip3 wheel --no-deps --wheel-dir dist trustgraph-core/
pip3 wheel --no-deps --wheel-dir dist trustgraph-embeddings-hf/
# container
CONTAINER=docker.io/trustgraph/trustgraph-flow
container:

View file

@ -1,10 +1,10 @@
import setuptools
import os
with open("../README.md", "r") as fh:
with open("README.md", "r") as fh:
long_description = fh.read()
version = "0.11.5"
version = "0.11.6"
setuptools.setup(
name="trustgraph-core",

View file

@ -1,10 +1,10 @@
import setuptools
import os
with open("../README.md", "r") as fh:
with open("README.md", "r") as fh:
long_description = fh.read()
version = "0.11.0"
version = "0.11.6"
setuptools.setup(
name="trustgraph-embeddings-hf",