forked from pypsa-meets-earth/pypsa-earth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (20 loc) · 724 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# SPDX-FileCopyrightText: PyPSA-Earth and PyPSA-Eur Authors
#
# SPDX-License-Identifier: CC-BY-4.0
FROM condaforge/mambaforge
RUN conda update -n base conda
RUN conda install -n base conda-libmamba-solver
RUN conda config --set solver libmamba
RUN apt-get update && apt-get install -y bash git && apt-get install gcc -y
WORKDIR /pypsa-earth
COPY ./envs ./temp
RUN conda env create -n pypsa-earth -f temp/linux-pinned.yaml
RUN conda init bash
RUN touch ~/.bashrc && echo "conda activate pypsa-earth" >> ~/.bashrc
SHELL ["/bin/bash", "--login", "-c"]
ENV PATH /opt/conda/envs/pypsa-earth/bin:$PATH
RUN conda install conda-forge::openjdk -y
RUN rm -r temp
RUN conda clean -afy && \
rm -rf /tmp/*
CMD ["bash"]