Skip to content

Commit

Permalink
Merge pull request #21 from yingkunwu/docker_image
Browse files Browse the repository at this point in the history
🎉 Add docker file for python
  • Loading branch information
StephLin authored Sep 30, 2024
2 parents 61a7651 + d0d8476 commit 658d7ea
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Python 3.10.12
FROM ubuntu:22.04

# avoid selecting 'Geographic area' during installation
ARG DEBIAN_FRONTEND=noninteractive

# apt install required packages
RUN apt-get update \
&& apt-get install -y curl libopenblas-dev pkg-config libssl-dev cmake \
git python3-pip python3-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Build python dependencies for FracGM
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN . "$HOME/.cargo/env"

RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install numpy "maturin[patchelf]" rich

RUN git clone --recurse-submodules -j8 https://github.com/StephLin/FracGM.git
WORKDIR /FracGM/fracgm-python
RUN /usr/bin/python3 -m pip install maturin patchelf
RUN . "$HOME/.cargo/env" && maturin build --release --interpreter /usr/bin/python3
WORKDIR /FracGM
RUN python3 -m pip install $(ls ./target/wheels/*.whl) --force-reinstall

WORKDIR /
CMD ["/bin/bash"]

0 comments on commit 658d7ea

Please sign in to comment.