diff --git a/Dockerfile b/Dockerfile index f6c2e227193fade5d65254f45d1649e9cd5c43b1..20a694bdae1148e189a28edecb84ea9953ef72c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,93 @@ -# # Start with a python base image -# FROM python:3.12.7 +# # Start with a base image that includes conda +# FROM continuumio/miniconda3:latest + +# # Set environment variables +# ENV CONDA_DEFAULT_ENV=pod +# ENV PATH /opt/conda/envs/${CONDA_DEFAULT_ENV}/bin:$PATH +# ENV HOME /root + + +# # Copy project file +# COPY requirements.txt . + +# # Create a conda environment and install the required packages +# RUN conda create --name ${CONDA_DEFAULT_ENV} python=3.12.7 -y && \ +# echo "conda activate ${CONDA_DEFAULT_ENV}" > ~/.bashrc && \ +# echo "conda install -n ${CONDA_DEFAULT_ENV} --file requirements.txt" > ~/.bashrc + +# # Activate environment +# SHELL ["conda", "run", "-n", "pod", "/bin/bash", "-c"] -# # # Install the required packages -# # RUN pip install -r requirements.txt +# WORKDIR /root -# # WORKDIR /root +# # Set the default environment on container start +# # ENTRYPOINT ["conda", "run", "-n", "pod", "/bin/bash", "-c"] # CMD ["bash"] -FROM python:3.12.7 +FROM continuumio/miniconda3:latest + +# Set working directory +WORKDIR /app + +# Copy environment setup files +COPY requirements.txt ./ + +# Update the base environment's Python version +RUN conda install -n base python=3.12.7 -y && \ +pip install --upgrade pip==25.0 && \ +pip install -r requirements.txt + +# # Install the required packages +# RUN pip install --upgrade pip==25.0 +# # RUN conda install vtk==9.4.0 -y +# RUN pip install -r requirements.txt +# # conda install --yes --file requirements.txt + +# Use the Conda environment +CMD ["/bin/bash"] + + + +# FROM continuumio/miniconda3:latest + +# # Set working directory +# WORKDIR /app + +# # Copy requirements file +# COPY requirements.txt ./ + +# # Install dependencies +# RUN conda update -n base -c defaults conda && \ +# conda create --name pod python=3.12.7 -c conda-forge && \ +# echo "conda activate pod" >> ~/.bashrc && \ +# /bin/bash -c "source ~/.bashrc && conda activate pod && \ +# conda install -c conda-forge vtk=9.3.1 && \ +# pip install -r requirements.txt" + +# # Ensure conda environment is activated when entering the container +# RUN echo "conda activate pod" >> /root/.bashrc +# SHELL ["/bin/bash", "--login", "-c"] + +# # Default to an interactive shell +# CMD ["/bin/bash"] + +# FROM python:3.12.7 + +# RUN apt-get update -y && apt-get upgrade -y + +# # Update pip +# RUN pip install --upgrade pip==25.0 -# Update pip -RUN pip install --upgrade pip +# # Copy your project files +# COPY requirements.txt . -# Copy your project files -COPY requirements.txt . +# # Install dependencies (if needed) +# # RUN pip install --upgrade pyvista +# # RUN pip install vtk +# RUN pip install -r requirements.txt -# Install dependencies (if needed) -RUN pip install -r requirements.txt +# WORKDIR /root -WORKDIR /root +# CMD ["python"] -CMD ["python"] diff --git a/README.md b/README.md index c5198a216c40d77b00cc9b25db0cf0847fe4b46b..3f3c87c444a6dd2ffe022740d1c0a151e5f3caf6 100755 --- a/README.md +++ b/README.md @@ -17,6 +17,16 @@ Use `Python=3.12.7` and run: pip install -r requirements.txt ``` +Note that for the `splinepy` installation a local version of `cmake`is necessary. +The suggested installation is via `conda` with: + +### Full installation with conda +```bash +conda create --name pod python=3.12.7 +conda activate pod +pip install -r requirements.txt +``` + ### Simulation: use `gismo` For the CFD simulation **Isogeometric Analysis** is utilized. diff --git a/requirements.txt b/requirements.txt index f15a429995a2aad7e2e8f5a5bfebd28093062d7f..efee004cdd72dcc86dc298650cd6399c5c58279f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,18 @@ -# ipython==8.30.0 -# joblib==1.4.2 -# keras-tuner==1.4.7 -# kneed==0.8.5 -# matplotlib==3.9.3 -# numpy==2.0.2 -# openpyxl==3.1.5 -# pandas==2.2.3 -# scikit-learn==1.5.2 -# scipy==1.14.1 -# tensorflow==2.18.0 -# gustaf==0.0.26 -# splinepy==0.1.3 +ipython==8.30.0 +joblib==1.4.2 +keras-tuner==1.4.7 +kneed==0.8.5 +matplotlib==3.9.3 +numpy==2.0.2 +openpyxl==3.1.5 +pandas==2.2.3 +scikit-learn==1.5.2 +scipy==1.14.1 +tensorflow==2.18.0 +gustaf==0.0.26 +splinepy==0.1.3 # vtk==9.4.0 -# vedo==2024.5.2 +vedo==2024.5.2 sphinx==8.2.1 myst-parser==4.0.1 sphinx-copybutton==0.5.2