Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move docker build to plug repo #25

Merged
merged 3 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish docker image

on:
workflow_dispatch:

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
context: build
tags: ghcr.io/breakthrough-energy/postreise:latest
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ __pycache__/

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
Expand Down
24 changes: 24 additions & 0 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM python:3.8.3

RUN apt-get update
RUN ln -s /mnt/bes/pcm $HOME/ScenarioData

RUN pip install -U pip pipenv ipython jupyterlab ipywidgets

RUN git clone --depth 1 https://github.com/Breakthrough-Energy/PowerSimData
RUN git clone --depth 1 https://github.com/Breakthrough-Energy/PostREISE

WORKDIR /PowerSimData
RUN mkdir -p /mnt/bes/pcm
RUN cp -r powersimdata/utility/templates /mnt/bes/pcm/

WORKDIR /PostREISE
RUN pipenv sync --dev --system;
RUN pip install .
RUN pip install ../PowerSimData
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we will soon be restricting the version of powersimdata specified in postreise, we need to install from the develop branch for this to be consistent with the current setup.


WORKDIR /app
RUN rm -rf /PowerSimData
RUN rm -rf /PostREISE

CMD ["jupyter", "lab", "--port=10000", "--no-browser", "--ip=0.0.0.0", "--allow-root"]
8 changes: 1 addition & 7 deletions standalone/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
services:
powersimdata: # included only for building postreise base image
build:
context: ../../PowerSimData
image: ghcr.io/breakthrough-energy/powersimdata:latest
client:
build:
context: ../../PostREISE
depends_on:
- powersimdata
context: ../build
reisejl:
build:
context: ../../REISE.jl