From 07aebeffddcefcd40ed91b311d9ebbd47be1e8ae Mon Sep 17 00:00:00 2001 From: Mathias Vanden Auweele Date: Mon, 18 Nov 2024 20:43:49 +0100 Subject: [PATCH] Added dockerfile for build & run --- Dockerfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..bb15d5e5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +# Use the official Python image as a base +FROM python:3.12-slim + +# Set the working directory in the container +WORKDIR /app + +# Copy the requirements file and any other necessary files +COPY pyproject.toml ./ + +# Install Hatch and any dependencies +RUN pip install --no-cache-dir hatch + +# Copy the rest of your application code, including the .gitmodules file +COPY . . + +# Install git for the submodules +RUN apt update && apt install git -y + +# Initialize and update submodules +RUN git submodule update --init --recursive + +# Build the package using Hatch +RUN hatch build + +# Install the built package +RUN pip install dist/*.whl + +# Change to data directory +WORKDIR /data \ No newline at end of file