diff --git a/.github/workflows/publish_images.yml b/.github/workflows/publish_images.yml index c7781e48..86b46541 100644 --- a/.github/workflows/publish_images.yml +++ b/.github/workflows/publish_images.yml @@ -89,6 +89,7 @@ jobs: context: . push: true tags: ${{ env.REGISTRY }}/${{ github.repository }}_${{ env.image_name }}:latest + labels: org.opencontainers.image.source=${{ github.repositoryUrl }}, org.opencontainers.image.version=${{ github.sha }} build-args: | python_version=${{ matrix.python_version }} target=${{ matrix.target }} diff --git a/Dockerfile b/Dockerfile index ab4379bd..6d0f6495 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,3 +52,4 @@ COPY poetry.lock pyproject.toml /deps/ # Install dependencies RUN poetry config virtualenvs.create false \ && poetry install --no-interaction --no-ansi --all-extras --no-root + diff --git a/Dockerfile.python3 b/Dockerfile.python3 deleted file mode 100644 index 4e08fb96..00000000 --- a/Dockerfile.python3 +++ /dev/null @@ -1,44 +0,0 @@ -# ARG for Python version, defaulting to 3.12 -ARG PYTHON_VERSION=3.12 - -# Use specified Python version as the base image -FROM python:${PYTHON_VERSION} - -# Set working directory -WORKDIR /data - -# Set environment variables -ENV PIP_CACHE_DIR="/data/.cache/pip" \ - POETRY_HOME="/data/.poetry" \ - POETRY_CACHE_DIR="/data/.cache/pypoetry" \ - GIT_SUBMODULE_STRATEGY="recursive" \ - DEBIAN_FRONTEND="noninteractive" - -# Install system dependencies -RUN apt-get update && apt-get install -y \ - git \ - mesa-utils \ - python3-dev \ - libblas-dev \ - liblapack-dev \ - libsndfile1-dev \ - libsox-dev \ - cmake \ - ninja-build \ - && rm -rf /var/lib/apt/lists/* - -# Install Poetry -RUN curl -sSL https://install.python-poetry.org/ | python3 - -ENV PATH="${POETRY_HOME}/bin:${PATH}" - -# Copy project files -# COPY hannah/pyproject.toml hannah/poetry.lock* ./ - -COPY hannah/ ./ - -# Configure Poetry and install dependencies -RUN poetry config installer.max-workers 10 && \ - poetry install --with dev - -# Show limits (this will be executed when the container runs) -CMD ["sh", "-c", "ulimit -a && /bin/bash"]