From 328fb2450995d94b59d023c153e62291d900a929 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Fri, 11 Apr 2025 01:23:47 +0100 Subject: [PATCH] adding dockerfile for builds --- Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2a786f1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +FROM debian:bookworm-slim AS base + +RUN apt update && \ + apt install -y build-essential curl git python3 pkg-config libssl-dev \ + && apt clean \ + && rm -rf /var/lib/apt/lists/* + +# Get Rust +RUN curl https://sh.rustup.rs -sSf | bash -s -- -y +RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc + +WORKDIR /app + +ADD https://astral.sh/uv/install.sh /uv-installer.sh +RUN sh /uv-installer.sh && rm /uv-installer.sh + +ENV PATH="/root/.local/bin/:$PATH" + +# RUN python3 -m pip install uv --break-system-packages +RUN uv venv +# /app/.venv/bin/python +ENV PATH="/app/.venv/bin/:$PATH" +RUN uv pip install "maturin[patchelf]" + +ADD src /app/src +ADD Cargo.toml /app/Cargo.toml +ADD README.md /app/README.md +ADD pyproject.toml /app/pyproject.toml + +RUN cp ./src/msyrs.pyi ./msyrs.pyi + +VOLUME /app/build + +# CMD ["/bin/bash"] +# CMD ["maturin", "build", "--release", "--out", "/app/build"] +# RUN maturin build --release --out ./build +# RUN uv build --sdist --wheel --out-dir ./build \ No newline at end of file