-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update lock file * make docker more simple * remove cpu only * tidy * remove venv * update entrypoint * fix docker (runs locally) * update generation data for pv * update work flow * fix * update github workflow * add logging * tidy up * remove "as base" from docker file * no-cache * ContainerFile * include ContainerFile * remove main ref * use v1 docker buildx * remove docker file
- Loading branch information
1 parent
7dcd777
commit dc6ab1d
Showing
6 changed files
with
50 additions
and
48 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 |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
!poetry.lock | ||
!pyproject.toml | ||
!README.md | ||
!ContainerFile |
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 |
---|---|---|
|
@@ -3,6 +3,15 @@ name: Docker Build | |
on: push | ||
|
||
jobs: | ||
|
||
DockerBuild: | ||
uses: openclimatefix/.github/.github/workflows/[email protected] | ||
name: Build docker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build | ||
run: docker build . -f ContainerFile --no-cache |
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,31 @@ | ||
FROM python:3.11-slim | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y git | ||
|
||
ENV PYTHONFAULTHANDLER=1 \ | ||
PYTHONHASHSEED=random \ | ||
PYTHONUNBUFFERED=1 | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y gdal-bin libgdal-dev g++ | ||
|
||
ENV PIP_DEFAULT_TIMEOUT=100 \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=1 \ | ||
PIP_NO_CACHE_DIR=1 \ | ||
POETRY_VERSION=1.7.1 | ||
|
||
RUN pip install "poetry==$POETRY_VERSION" | ||
|
||
COPY pyproject.toml poetry.lock README.md . | ||
RUN poetry install --no-dev --no-root | ||
|
||
COPY india_forecast_app ./india_forecast_app | ||
RUN poetry build | ||
RUN poetry install | ||
|
||
COPY nwp.zarr ./nwp.zarr | ||
|
||
ENTRYPOINT ["poetry", "run" , "python3", "india_forecast_app/app.py", "--write-to-db"] |
This file was deleted.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.