-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Deploy dev-env image | ||
|
||
on: | ||
push: | ||
paths: | ||
- envs/linux-pinned.yaml | ||
workflow_dispatch: | ||
|
||
jobs: | ||
push-image: | ||
name: Push dev-env image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@main | ||
|
||
- name: 'Login to GitHub Container Registry' | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.REGISTRY_TOKEN }} | ||
|
||
- name: 'Build Inventory Image' | ||
run: | | ||
docker build . --tag ghcr.io/${{ github.repository_owner }}/eur-dev-env:latest --file docker/dev-env/Dockerfile | ||
docker push ghcr.io/${{ github.repository_owner }}/eur-dev-env:latest |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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 make | ||
|
||
RUN conda --version | ||
|
||
WORKDIR /pypsa-eur | ||
|
||
COPY ./envs ./temp | ||
|
||
RUN conda env create -n pypsa-eur -f temp/environment.yaml | ||
RUN conda init bash | ||
RUN echo "conda activate pypsa-eur" >> ~/.bashrc | ||
|
||
SHELL ["/bin/bash", "--login", "-c"] | ||
ENV PATH=/opt/conda/envs/pypsa-eur/bin:$PATH | ||
|
||
RUN rm -r temp | ||
RUN conda clean -afy && \ | ||
rm -rf /tmp/* | ||
|
||
CMD ["bash"] |