-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into actions-e2e
- Loading branch information
Showing
7 changed files
with
418 additions
and
41 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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Docker Image | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build-tag: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
install: true | ||
|
||
- name: Login to Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and also push Dockerimage | ||
id: build-and-push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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
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
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 |
---|---|---|
@@ -1,26 +1,26 @@ | ||
FROM continuumio/miniconda3:4.10.3 | ||
FROM continuumio/miniconda3:23.5.2-0 | ||
|
||
RUN conda install -y numpy pip scipy astropy pytest mock requests ipython coverage pyyaml\ | ||
&& conda install -y -c conda-forge kombu=4.4.0 elasticsearch\<6.0.0,\>=5.0.0 pytest-astropy mysql-connector-python\ | ||
&& conda clean -y --all | ||
|
||
RUN pip install --no-cache-dir cython logutils lcogt_logging python-dateutil sqlalchemy\>=1.3.0b1 psycopg2-binary celery[redis]==4.3.0 \ | ||
apscheduler ocs-ingester tenacity amqp==2.6.0 cosmic-conn | ||
# In principle I could remove the gcc to shrink the image, but pytorch is already so large it doesn't make much difference | ||
RUN apt-get -y update && apt-get -y install gcc && \ | ||
apt-get autoclean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN mkdir /home/archive && /usr/sbin/groupadd -g 10000 "domainusers" \ | ||
&& /usr/sbin/useradd -g 10000 -d /home/archive -M -N -u 10087 archive \ | ||
&& chown -R archive:domainusers /home/archive | ||
|
||
COPY --chown=10087:10000 . /lco/banzai | ||
|
||
RUN apt-get -y update && apt-get -y install gcc && \ | ||
pip install --no-cache-dir git+https://github.com/cmccully/sep.git@deblending /lco/banzai/ && \ | ||
apt-get -y remove gcc && \ | ||
apt-get autoclean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
USER archive | ||
|
||
ENV HOME /home/archive | ||
|
||
WORKDIR /home/archive | ||
|
||
COPY environment.yaml . | ||
|
||
RUN . /opt/conda/etc/profile.d/conda.sh && conda config --set remote_read_timeout_secs 900 && conda env create -p /home/archive/envs/banzai -f environment.yaml --solver=libmamba | ||
|
||
COPY --chown=10087:10000 . /lco/banzai | ||
|
||
ENV PATH /home/archive/envs/banzai/bin:$PATH | ||
|
||
RUN /home/archive/envs/banzai/bin/pip install --no-cache-dir /lco/banzai/ |
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
Oops, something went wrong.