-
Notifications
You must be signed in to change notification settings - Fork 0
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 #10 from ins-amu/develop
Develop
- Loading branch information
Showing
5 changed files
with
64 additions
and
16,589 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 |
---|---|---|
@@ -1,28 +1,42 @@ | ||
# Use the smallest official Python image | ||
FROM python:3.9-slim | ||
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04 | ||
|
||
# Set environment variables to avoid interactive prompts | ||
# Set environment to avoid interactive prompts | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
swig \ | ||
# Install system dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
python3.10 \ | ||
python3-pip \ | ||
build-essential \ | ||
git \ | ||
gcc \ | ||
g++ \ | ||
libatlas-base-dev \ | ||
libopenblas-dev \ | ||
libhdf5-dev \ | ||
swig \ | ||
tzdata \ | ||
&& ln -s /usr/bin/python3 /usr/bin/python \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set timezone (e.g., UTC) to avoid configuration prompts | ||
RUN echo "Etc/UTC" > /etc/timezone && \ | ||
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \ | ||
dpkg-reconfigure -f noninteractive tzdata | ||
|
||
# Copy only the package files (without installing dependencies) | ||
COPY . . | ||
WORKDIR /app | ||
|
||
RUN pip install --upgrade pip | ||
|
||
# Install Python dependencies | ||
RUN pip install --no-cache-dir hatchling setuptools wheel && \ | ||
pip install . | ||
RUN pip install --no-cache-dir \ | ||
hatchling \ | ||
setuptools>=45 \ | ||
wheel \ | ||
swig>=4.0 | ||
|
||
COPY . . | ||
|
||
# Optional: Support GPU version (comment out if not needed) | ||
ARG GPU_SUPPORT=false | ||
RUN if [ "$GPU_SUPPORT" = "true" ]; then pip install cupy; fi | ||
RUN pip install . --no-cache-dir | ||
RUN pip install cupy-cuda11x | ||
|
||
# Set the default command (modify as needed) | ||
CMD ["python", "-c", "from vbi.utils import test_imports; test_imports()"] |
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
Oops, something went wrong.