From cb6fe49cd8d3a70c1a93801fb6246e63235d8fa8 Mon Sep 17 00:00:00 2001 From: Kev Date: Fri, 22 Nov 2024 15:03:23 -0500 Subject: [PATCH] Move docker requirements into text files (#18) --- .github/workflows/lint.yml | 9 +++++---- Docker/pirate-api | 2 +- Docker/pirate-ingest | 2 +- Docker/requirements-api.txt | 20 ++++++++++++++++++++ Docker/requirements-ingest.txt | 19 +++++++++++++++++++ requirements.txt => requirements-lint.txt | 0 6 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 Docker/requirements-api.txt create mode 100644 Docker/requirements-ingest.txt rename requirements.txt => requirements-lint.txt (100%) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 65d49c1..a48719a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,16 +19,17 @@ jobs: uses: actions/setup-python@v5.3.0 with: python-version: "3.12.4" - cache: "pip" - name: "Install requirements" - run: python3 -m pip install -r requirements.txt + run: | + python -m pip install --upgrade pip + pip install ruff - name: "Format" - run: python3 -m ruff format . + run: ruff format . - name: "Check" - run: python3 -m ruff check --output-format=github . --fix --exit-zero + run: ruff check --output-format=github . --fix --exit-zero - name: "Auto Commit" uses: stefanzweifel/git-auto-commit-action@v5.0.1 diff --git a/Docker/pirate-api b/Docker/pirate-api index 5ed06b5..51210f9 100644 --- a/Docker/pirate-api +++ b/Docker/pirate-api @@ -4,7 +4,7 @@ RUN apt update && \ apt -y install build-essential \ libffi-dev -RUN pip install astral timezonefinder pytz zarr s3fs ujson starlette uvicorn fastapi fastapi-utils boto3 scipy orjson psutil typing-inspect watchfiles dask xarray pandas fastparquet +RUN pip install -r requirements-api.txt run apt -y install unzip rsync diff --git a/Docker/pirate-ingest b/Docker/pirate-ingest index 5425696..7fbfd6b 100644 --- a/Docker/pirate-ingest +++ b/Docker/pirate-ingest @@ -56,6 +56,6 @@ RUN python3 -m venv /opt/venv ENV PATH="/opt/venv/bin:$PATH" # Install python libs -RUN python3 -m pip install numpy boto3 netCDF4 xarray cartopy cfgrib "eccodes>=1.6.1" zarr dask "s3fs>=2023.10.0" bottleneck rioxarray dask[distributed] xarray-spatial redis rechunker geopandas nwswx git+https://github.com/blaylockbk/Herbie.git +RUN python3 -m pip install -r requirements-ingest.txt ENTRYPOINT ["python3"] \ No newline at end of file diff --git a/Docker/requirements-api.txt b/Docker/requirements-api.txt new file mode 100644 index 0000000..30e0d52 --- /dev/null +++ b/Docker/requirements-api.txt @@ -0,0 +1,20 @@ +astral==3.2 +timezonefinder==6.5.4 +pytz==2024.2 +zarr==2.18.3 +s3fs==2024.10.0 +ujson==5.10.0 +starlette==0.41.3 +uvicorn==0.32.0 +fastapi==0.115.5 +fastapi-utils==0.8.0 +boto3==1.35.65 +scipy==1.14.1 +orjson==3.10.11 +psutil==6.1.0 +typing-inspect==0.9.0 +watchfiles==0.24.0 +dask==2024.11.2 +xarray==2024.10.0 +pandas==2.2.3 +fastparquet==2024.11.0 \ No newline at end of file diff --git a/Docker/requirements-ingest.txt b/Docker/requirements-ingest.txt new file mode 100644 index 0000000..c5a4bb1 --- /dev/null +++ b/Docker/requirements-ingest.txt @@ -0,0 +1,19 @@ +numpy==2.1.3 +boto3==1.35.65 +netCDF4==1.7.2 +xarray==2024.10.0 +cartopy==0.24.1 +cfgrib==0.9.14.1 +eccodes>=1.6.1 +zarr==2.18.3 +dask==2024.11.2 +s3fs==2024.10.0 +bottleneck==1.4.2 +rioxarray==0.18.1 +distributed==2024.11.2 +xarray-spatial==0.4.0 +redis==5.2.0 +rechunker==0.5.2 +geopandas==1.0.1 +nwswx==0.1.2 +git+https://github.com/blaylockbk/Herbie.git \ No newline at end of file diff --git a/requirements.txt b/requirements-lint.txt similarity index 100% rename from requirements.txt rename to requirements-lint.txt