Skip to content

Commit

Permalink
change back to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Feb 26, 2024
1 parent f69e502 commit 6a1aaeb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: Build
run: docker build . -f ContainerFile --no-cache
run: docker build .
31 changes: 31 additions & 0 deletions Dockerfile
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"]

0 comments on commit 6a1aaeb

Please sign in to comment.