-
Notifications
You must be signed in to change notification settings - Fork 1
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 #45 from simonprovost/feature/v0.0.4
First Release Scikit-Longitudinal Github and PyPi
- Loading branch information
Showing
10 changed files
with
101 additions
and
136 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
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
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 |
---|---|---|
@@ -1,106 +1,37 @@ | ||
ARG CONDA_VER=2023.09-0 | ||
ARG OS_TYPE | ||
ARG PYTHON_BASE=3.9-slim | ||
FROM python:$PYTHON_BASE AS builder | ||
|
||
FROM python:3.9.8 AS builder | ||
RUN pip install -U pdm | ||
ENV PDM_CHECK_UPDATE=false | ||
|
||
# ========================== | ||
# Dockerfile for Scikit Longitudinal Project | ||
# System: Linux under Python 3.9.8 lightweight image | ||
# Python: 3.9.8 | ||
# ========================== | ||
|
||
RUN echo "==========================\nStage 1: The Build Process\n==========================" | ||
|
||
# ----------------------------------- | ||
# 🛠 System-level Setup and Libraries 🛠 | ||
# ----------------------------------- | ||
RUN apt-get update && apt-get install -y libomp-dev | ||
|
||
# ------------------------ | ||
# 🛠 Compiler Configurations 🛠 | ||
# ------------------------ | ||
RUN apt-get update && apt-get install -y build-essential libomp-dev libc-dev && apt-get clean && rm -rf /var/lib/apt/lists/* | ||
ENV CC=gcc | ||
ENV CXX=g++ | ||
ENV CPPFLAGS="-I/usr/local/include" | ||
ENV CFLAGS="-Wall" | ||
ENV CXXFLAGS="-Wall" | ||
ENV LDFLAGS="-L/usr/local/lib" | ||
|
||
# ------------------- | ||
# 🛠 Python Utilities 🛠 | ||
# ------------------- | ||
RUN echo "🛠 Python Utilities 🛠" | ||
RUN pip install -U pip setuptools wheel | ||
RUN pip install pdm | ||
|
||
# --------------------------- | ||
# 📦 Python Dependency Setup 📦 | ||
# --------------------------- | ||
COPY pyproject.toml pdm.lock /scikit_longitudinal/ | ||
WORKDIR /scikit_longitudinal | ||
RUN mkdir __pypackages__ | ||
|
||
FROM python:3.9 | ||
RUN echo "==========================\nStage 2: The Run-Time Setup\n==========================" | ||
|
||
# ----------------------------------- | ||
# 🛠 System-level Setup and Libraries 🛠 | ||
# ----------------------------------- | ||
RUN echo "🛠 System-level Setup and Libraries 🛠" | ||
RUN apt-get update && apt-get install -y libomp-dev build-essential wget curl libc-dev && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# ------------------------- | ||
# 🐍 Anaconda Installation 🐍 | ||
# ------------------------- | ||
RUN echo "🐍 Anaconda Installation 🐍" | ||
ARG CONDA_VER | ||
ARG OS_TYPE | ||
RUN if [ -z "${OS_TYPE}" ]; then echo "OS_TYPE argument not provided"; exit 1; fi | ||
RUN wget -q "https://repo.anaconda.com/archive/Anaconda3-${CONDA_VER}-Linux-${OS_TYPE}.sh" -O ~/Anaconda.sh | ||
RUN dpkg --add-architecture arm64 | ||
RUN apt update -y | ||
RUN apt install -y libc6:arm64 | ||
RUN bash ~/Anaconda.sh -b -p /anaconda | ||
RUN rm ~/Anaconda.sh | ||
ENV PATH=/anaconda/bin:${PATH} | ||
RUN conda update --quiet -y conda | ||
COPY scikit_longitudinal/ /scikit_longitudinal/scikit_longitudinal/ | ||
COPY data/ /scikit_longitudinal/data/ | ||
COPY scripts/ /scikit_longitudinal/scripts/ | ||
COPY .env README.md .coveragerc /scikit_longitudinal/ | ||
|
||
# ------------------------ | ||
# 🛠 Compiler Configurations 🛠 | ||
# ------------------------ | ||
RUN echo "🛠 Compiler Configurations 🛠" | ||
ENV CC=gcc | ||
ENV CXX=g++ | ||
ENV CPPFLAGS="-I/usr/local/include" | ||
ENV CFLAGS="-Wall" | ||
ENV CXXFLAGS="-Wall" | ||
ENV LDFLAGS="-L/usr/local/lib" | ||
WORKDIR /scikit_longitudinal | ||
RUN pdm install --check --with :all --no-editable | ||
|
||
# --------------------------- | ||
# 🐍 Python Environment Setup 🐍 | ||
# --------------------------- | ||
RUN echo "🐍 Python Environment Setup 🐍" | ||
ENV PYTHONPATH=/scikit_longitudinal/pkgs | ||
FROM python:$PYTHON_BASE | ||
|
||
# ---------------------- | ||
# 📦 Project File Setup 📦 | ||
# ---------------------- | ||
RUN echo "📦 Project File Setup 📦" | ||
COPY --from=builder /scikit_longitudinal/.venv/ /scikit_longitudinal/.venv | ||
ENV PATH="/scikit_longitudinal/.venv/bin:$PATH" | ||
COPY pyproject.toml pdm.lock /scikit_longitudinal/ | ||
COPY scikit_longitudinal/ /scikit_longitudinal/scikit_longitudinal/ | ||
COPY scikit-learn/ /scikit_longitudinal/scikit-learn/ | ||
COPY data/ /scikit_longitudinal/data/ | ||
COPY scripts/ /scikit_longitudinal/scripts/ | ||
COPY .env README.md .coveragerc /scripts/linux/docker_scikit_longitudinal_installs.sh /scripts/linux/docker_start_pdm_env.sh /scikit_longitudinal/ | ||
COPY .env README.md .coveragerc /scikit_longitudinal/ | ||
|
||
# ------------------------------- | ||
# 🚀 Scikit Longitudinal Installation 🚀 | ||
# ------------------------------- | ||
RUN echo "🚀 Scikit Longitudinal Installation 🚀" | ||
WORKDIR /scikit_longitudinal | ||
RUN pip install pdm | ||
ENV PDM_IN_ENV=in-project | ||
RUN chmod +x /scikit_longitudinal/scripts/linux/docker_scikit_longitudinal_installs.sh /scikit_longitudinal/scripts/linux/docker_start_pdm_env.sh | ||
RUN /scikit_longitudinal/scripts/linux/docker_scikit_longitudinal_installs.sh | ||
CMD ["/bin/bash"] |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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