-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from yingkunwu/docker_image
🎉 Add docker file for python
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |