| FROM nvidia/cuda:11.1.1-cudnn8-devel-ubuntu18.04 | |
| ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 | |
| ENV PATH /opt/conda/bin:$PATH | |
| # Install Dependencies of Miniconda | |
| RUN apt-get update --fix-missing && \ | |
| apt-get install -y wget bzip2 curl git && \ | |
| apt-get install -y libgl1-mesa-glx libgl1-mesa-dri && \ | |
| apt-get install -y libglib2.0-0 && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Install miniconda3 | |
| RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ | |
| /bin/bash ~/miniconda.sh -b -p /opt/conda && \ | |
| rm ~/miniconda.sh && \ | |
| /opt/conda/bin/conda clean -tipy && \ | |
| ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ | |
| echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ | |
| echo "conda activate resshift_env" >> ~/.bashrc | |
| # Create and activate a new Conda environment | |
| RUN /opt/conda/bin/conda create -n resshift_env python=3.10 -y && \ | |
| /opt/conda/bin/conda clean -tipy | |
| # Activate the environment and install pip packages | |
| COPY ../requirements.txt . | |
| RUN /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && conda activate resshift_env && pip install -r requirements.txt" | |
| CMD [ "/bin/bash" ] |