Skip to content

Commit

Permalink
Remove chardet from images (#91)
Browse files Browse the repository at this point in the history
* CM build w/o chardet

* GI build w/o chardet

* Reworked collection manager dependencies

* Update CHANGELOG.md

* GI: Fallback to conda if mamba is not present

---------

Co-authored-by: rileykk <[email protected]>
  • Loading branch information
RKuttruff and rileykk authored Nov 22, 2023
1 parent a9f0673 commit dc36ff6
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.0] - 2023-09-14
## [1.2.0] - 2023-11-22
### Added
- SDAP-477: Added preprocessor to properly shape incoming data
- SDAP-478: Add support to user to select subgroup of interest in input granules
### Changed
- Changed granule ingester setup to use mamba instead of conda
### Deprecated
### Removed
- SDAP-501: Updated dependencies to remove `chardet`
### Fixed
- SDAP-488: Workaround to build issue on Apple Silicon (M1/M2). GI image build installs nexusproto through PyPI instead of building from source. A build arg `BUILD_NEXUSPROTO` was defined to allow building from source if desired/
### Security
Expand Down
4 changes: 1 addition & 3 deletions collection_manager/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ COPY collection_manager/README.md /collection_manager/README.md
COPY collection_manager/docker/entrypoint.sh /entrypoint.sh

RUN cd /common && python setup.py install
RUN cd /collection_manager && python setup.py install

RUN pip install boto3==1.16.10
RUN cd /collection_manager && python setup.py install && pip uninstall -y chardet && pip install boto3==1.16.10 requests==2.26.0

ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
10 changes: 6 additions & 4 deletions collection_manager/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ PyYAML==5.3.1
pystache==0.5.4
pysolr==3.9.0
watchdog==0.10.2
requests==2.23.0
requests==2.31.0
tenacity==6.2.0
aioboto3==8.0.5
aiohttp==3.7.2
aio-pika==6.7.1
aioboto3==8.3.0
aiobotocore==1.2.2
aiohttp==3.8.3
aio-pika==6.7.1
urllib3==1.25.8
4 changes: 2 additions & 2 deletions granule_ingester/conda-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pandas>=1.0.4
pytz==2019.3
xarray>=0.19.0
pyyaml==5.3.1
aiohttp==3.6.2
aiohttp>=3.8.0
tenacity
requests==2.27.1
requests>=2.27.1

9 changes: 7 additions & 2 deletions granule_ingester/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ ARG APACHE_NEXUSPROTO=https://github.com/apache/incubator-sdap-nexusproto.git
ARG APACHE_NEXUSPROTO_BRANCH=master

RUN ./install_nexusproto.sh
RUN cd /common && python setup.py install
RUN cd /sdap && python setup.py install
RUN cd /common && python setup.py install clean

RUN pip uninstall -y chardet

RUN conda install -n base --override-channels -c conda-forge -c defaults mamba libarchive=3.5.2=hb890918_3 && conda clean -afy

RUN cd /sdap && python setup.py install clean && mamba clean -afy

RUN pip install boto3==1.16.10

Expand Down
8 changes: 6 additions & 2 deletions granule_ingester/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
__version__ = f.readline()

try:
check_call(['conda', 'install', '-y', '-c', 'conda-forge', '--file', 'conda-requirements.txt'])
check_call(['mamba', 'install', '-y', '-c', 'conda-forge', '--file', 'conda-requirements.txt'])
except (CalledProcessError, IOError) as e:
raise EnvironmentError("Error installing conda packages", e)
print('Failed install with mamba; falling back to conda')
try:
check_call(['conda', 'install', '-y', '-c', 'conda-forge', '--file', 'conda-requirements.txt'])
except (CalledProcessError, IOError) as e:
raise EnvironmentError("Error installing conda packages", e)

setup(
name='sdap_granule_ingester',
Expand Down

0 comments on commit dc36ff6

Please sign in to comment.