Skip to content

Commit

Permalink
Added pinned versions to docker build. Should make it faster.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmccully committed Oct 12, 2023
1 parent 7b3c5d4 commit 0c0695c
Show file tree
Hide file tree
Showing 3 changed files with 342 additions and 21 deletions.
28 changes: 13 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
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 photutils bottleneck 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 /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 env create -p /home/archive/envs/banzai -f environment.yaml --solver=libmamba && conda activate /home/archive/envs/banzai

COPY --chown=10087:10000 . /lco/banzai

RUN /home/archive/envs/banzai/bin/pip install --no-cache-dir /lco/banzai/
323 changes: 323 additions & 0 deletions environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,323 @@
channels:
- pytorch
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_kmp_llvm
- affine=2.4.0=pyhd8ed1ab_0
- amqp=2.6.1=pyh9f0ad1d_0
- anyio=4.0.0=pyhd8ed1ab_0
- aom=3.6.1=h59595ed_0
- apscheduler=3.10.4=pyhd8ed1ab_0
- asdf=2.15.1=pyhd8ed1ab_0
- asdf-astropy=0.4.0=pyhd8ed1ab_1
- asdf-coordinates-schemas=0.2.0=pyhd8ed1ab_1
- asdf-standard=1.0.3=pyhd8ed1ab_0
- asdf-transform-schemas=0.3.0=pyhd8ed1ab_0
- asdf-unit-schemas=0.1.0=pyhd8ed1ab_0
- asdf-wcs-schemas=0.1.1=pyhd8ed1ab_0
- astropy=5.3.4=py311h1f0f07a_2
- asttokens=2.4.0=pyhd8ed1ab_0
- attrs=23.1.0=pyh71513ae_1
- backcall=0.2.0=pyh9f0ad1d_0
- backports=1.0=pyhd8ed1ab_3
- backports.functools_lru_cache=1.6.5=pyhd8ed1ab_0
- backports.zoneinfo=0.2.1=py311h38be061_8
- billiard=3.6.4.0=py311hd4cff14_3
- blas=2.116=mkl
- blas-devel=3.9.0=16_linux64_mkl
- blosc=1.21.5=h0f2a231_0
- bottleneck=1.3.7=py311h1f0f07a_1
- brotli=1.1.0=hd590300_1
- brotli-bin=1.1.0=hd590300_1
- brotli-python=1.1.0=py311hb755f60_1
- brunsli=0.1=h9c3ff4c_0
- bzip2=1.0.8=h7f98852_4
- c-ares=1.20.1=hd590300_0
- c-blosc2=2.10.5=hb4ffafa_0
- ca-certificates=2023.7.22=hbcca054_0
- cairo=1.18.0=h3faef2a_0
- celery=4.4.0=py_0
- certifi=2023.7.22=pyhd8ed1ab_0
- cffi=1.16.0=py311hb3a22ac_0
- cfitsio=4.3.0=hbdc6101_0
- charls=2.4.2=h59595ed_0
- charset-normalizer=3.3.0=pyhd8ed1ab_0
- click=8.1.7=unix_pyh707e725_0
- click-plugins=1.1.1=py_0
- cligj=0.7.2=pyhd8ed1ab_1
- colorama=0.4.6=pyhd8ed1ab_0
- contourpy=1.1.1=py311h9547e67_1
- coverage=7.3.2=py311h459d7ec_0
- cryptography=41.0.4=py311h63ff55d_0
- cycler=0.12.1=pyhd8ed1ab_0
- cython=0.29.36=py311hb755f60_1
- dav1d=1.2.1=hd590300_0
- decorator=5.1.1=pyhd8ed1ab_0
- dnspython=2.4.2=pyhd8ed1ab_0
- elasticsearch=5.5.3=pyh9f0ad1d_0
- emcee=3.1.4=pyhd8ed1ab_0
- exceptiongroup=1.1.3=pyhd8ed1ab_0
- executing=1.2.0=pyhd8ed1ab_0
- expat=2.5.0=hcb278e6_1
- filelock=3.12.4=pyhd8ed1ab_0
- font-ttf-dejavu-sans-mono=2.37=hab24e00_0
- font-ttf-inconsolata=3.000=h77eed37_0
- font-ttf-source-code-pro=2.038=h77eed37_0
- font-ttf-ubuntu=0.83=hab24e00_0
- fontconfig=2.14.2=h14ed4e7_0
- fonts-conda-ecosystem=1=0
- fonts-conda-forge=1=0
- fonttools=4.43.1=py311h459d7ec_0
- freetype=2.12.1=h267a509_2
- freexl=2.0.0=h743c826_0
- geos=3.12.0=h59595ed_0
- geotiff=1.7.1=hee599c5_13
- gettext=0.21.1=h27087fc_0
- giflib=5.2.1=h0b41bf4_3
- gmp=6.2.1=h58526e2_0
- gmpy2=2.1.2=py311h6a5fa03_1
- greenlet=3.0.0=py311hb755f60_1
- gwcs=0.19.0=pyhd8ed1ab_0
- h11=0.14.0=pyhd8ed1ab_0
- h2=4.1.0=pyhd8ed1ab_0
- hdf4=4.2.15=h501b40f_6
- hdf5=1.14.2=nompi_h4f84152_100
- hpack=4.0.0=pyh9f0ad1d_0
- httpcore=1.0.0=pyhd8ed1ab_0
- hyperframe=6.0.1=pyhd8ed1ab_0
- hypothesis=6.87.3=pyha770c72_0
- icu=73.2=h59595ed_0
- idna=3.4=pyhd8ed1ab_0
- imagecodecs=2023.9.18=py311h9b38416_0
- imageio=2.31.5=pyh8c1a49c_0
- importlib-metadata=6.8.0=pyha770c72_0
- importlib-resources=6.1.0=pyhd8ed1ab_0
- importlib_resources=6.1.0=pyhd8ed1ab_0
- iniconfig=2.0.0=pyhd8ed1ab_0
- ipython=8.16.1=pyh0d859eb_0
- jedi=0.19.1=pyhd8ed1ab_0
- jinja2=3.1.2=pyhd8ed1ab_1
- jmespath=1.0.1=pyhd8ed1ab_0
- joblib=1.3.2=pyhd8ed1ab_0
- json-c=0.17=h7ab15ed_0
- jsonschema=4.19.1=pyhd8ed1ab_0
- jsonschema-specifications=2023.7.1=pyhd8ed1ab_0
- jxrlib=1.1=h7f98852_2
- kealib=1.5.2=hcd42e92_1
- keyutils=1.6.1=h166bdaf_0
- kiwisolver=1.4.5=py311h9547e67_1
- krb5=1.21.2=h659d440_0
- lazy_loader=0.3=pyhd8ed1ab_0
- lcms2=2.15=h7f713cb_2
- ld_impl_linux-64=2.40=h41732ed_0
- lerc=4.0.0=h27087fc_0
- libaec=1.1.2=h59595ed_1
- libarchive=3.7.2=h039dbb9_0
- libavif16=1.0.1=h87da1f6_2
- libblas=3.9.0=16_linux64_mkl
- libboost-headers=1.82.0=ha770c72_6
- libbrotlicommon=1.1.0=hd590300_1
- libbrotlidec=1.1.0=hd590300_1
- libbrotlienc=1.1.0=hd590300_1
- libcblas=3.9.0=16_linux64_mkl
- libcurl=8.4.0=hca28451_0
- libdeflate=1.19=hd590300_0
- libedit=3.1.20191231=he28a2e2_2
- libev=4.33=h516909a_1
- libexpat=2.5.0=hcb278e6_1
- libffi=3.4.2=h7f98852_5
- libgcc-ng=13.2.0=h807b86a_2
- libgdal=3.7.2=h3aa23ec_3
- libgfortran-ng=13.2.0=h69a702a_2
- libgfortran5=13.2.0=ha4646dd_2
- libglib=2.78.0=hebfc3b9_0
- libhwloc=2.9.3=default_h554bfaf_1009
- libiconv=1.17=h166bdaf_0
- libjpeg-turbo=2.1.5.1=hd590300_1
- libkml=1.3.0=h01aab08_1018
- liblapack=3.9.0=16_linux64_mkl
- liblapacke=3.9.0=16_linux64_mkl
- libnetcdf=4.9.2=nompi_h80fb2b6_112
- libnghttp2=1.52.0=h61bc06f_0
- libnsl=2.0.0=hd590300_1
- libpng=1.6.39=h753d276_0
- libpq=15.4=hfc447b1_2
- libprotobuf=3.20.3=h3eb15da_0
- librttopo=1.1.0=hb58d41b_14
- libspatialite=5.1.0=h090f1da_0
- libsqlite=3.43.2=h2797004_0
- libssh2=1.11.0=h0841786_0
- libstdcxx-ng=13.2.0=h7e041cc_2
- libtiff=4.6.0=h29866fb_1
- libuuid=2.38.1=h0b41bf4_0
- libwebp-base=1.3.2=hd590300_0
- libxcb=1.15=h0b41bf4_0
- libxml2=2.11.5=h232c23b_1
- libzip=1.10.1=h2629f0a_3
- libzlib=1.2.13=hd590300_5
- libzopfli=1.0.3=h9c3ff4c_0
- llvm-openmp=15.0.7=h0cdce71_0
- lz4-c=1.9.4=hcb278e6_0
- lzo=2.10=h516909a_1000
- markupsafe=2.1.3=py311h459d7ec_1
- matplotlib-base=3.8.0=py311h54ef318_2
- matplotlib-inline=0.1.6=pyhd8ed1ab_0
- minizip=4.0.1=h0ab5242_5
- mkl=2022.1.0=h84fe81f_915
- mkl-devel=2022.1.0=ha770c72_916
- mkl-include=2022.1.0=h84fe81f_915
- mock=5.1.0=pyhd8ed1ab_0
- mpc=1.3.1=hfe3b2da_0
- mpfr=4.2.0=hb012696_0
- mpmath=1.3.0=pyhd8ed1ab_0
- munkres=1.1.4=pyh9f0ad1d_0
- mysql-common=8.0.33=hf1915f5_5
- mysql-connector-python=8.0.32=py311h381d6c5_0
- mysql-libs=8.0.33=hca2cd23_5
- ncurses=6.4=hcb278e6_0
- networkx=3.1=pyhd8ed1ab_0
- nspr=4.35=h27087fc_0
- nss=3.94=h1d7d5a4_0
- numpy=1.23.5=py311h7d28db0_0
- openjpeg=2.5.0=h488ebb8_3
- openssl=3.1.3=hd590300_0
- packaging=23.2=pyhd8ed1ab_0
- parso=0.8.3=pyhd8ed1ab_0
- pcre2=10.40=hc3806b6_0
- pexpect=4.8.0=pyh1a96a4e_2
- photutils=1.9.0=py311h459d7ec_0
- pickleshare=0.7.5=py_1003
- pillow=10.0.1=py311h8aef010_1
- pip=23.2.1=pyhd8ed1ab_0
- pixman=0.42.2=h59595ed_0
- pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
- pluggy=1.3.0=pyhd8ed1ab_0
- poppler=23.08.0=hf2349cb_2
- poppler-data=0.4.12=hd8ed1ab_0
- postgresql=15.4=h8972f4a_2
- proj=9.3.0=h1d62c97_1
- prompt-toolkit=3.0.39=pyha770c72_0
- prompt_toolkit=3.0.39=hd8ed1ab_0
- protobuf=3.20.3=py311hcafe171_1
- psutil=5.9.5=py311h459d7ec_1
- psycopg2=2.9.7=py311h68d4568_0
- psycopg2-binary=2.9.7=pyhd8ed1ab_0
- pthread-stubs=0.4=h36c2ea0_1001
- ptyprocess=0.7.0=pyhd3deb0d_0
- pure_eval=0.2.2=pyhd8ed1ab_0
- pycparser=2.21=pyhd8ed1ab_0
- pyerfa=2.0.0.3=py311h1f0f07a_1
- pygments=2.16.1=pyhd8ed1ab_0
- pyparsing=3.1.1=pyhd8ed1ab_0
- pysocks=1.7.1=pyha2e5f31_6
- pytest=7.4.2=pyhd8ed1ab_0
- pytest-arraydiff=0.5.0=pyhd8ed1ab_0
- pytest-astropy=0.10.0=pyhd8ed1ab_0
- pytest-astropy-header=0.2.2=pyhd8ed1ab_0
- pytest-cov=4.1.0=pyhd8ed1ab_0
- pytest-doctestplus=1.0.0=pyhd8ed1ab_0
- pytest-filter-subpackage=0.1.2=pyhd8ed1ab_0
- pytest-mock=3.11.1=pyhd8ed1ab_0
- pytest-openfiles=0.5.0=py_0
- pytest-remotedata=0.4.1=pyhd8ed1ab_0
- python=3.11.6=hab00c5b_0_cpython
- python-dateutil=2.8.2=pyhd8ed1ab_0
- python_abi=3.11=4_cp311
- pytorch=2.1.0=py3.11_cpu_0
- pytorch-mutex=1.0=cpu
- pytz=2023.3.post1=pyhd8ed1ab_0
- pywavelets=1.4.1=py311h1f0f07a_1
- pyyaml=6.0.1=py311h459d7ec_1
- rasterio=1.3.8=py311h40fbdff_3
- rav1e=0.6.6=he8a937b_2
- readline=8.2=h8228510_1
- referencing=0.30.2=pyhd8ed1ab_0
- requests=2.31.0=pyhd8ed1ab_0
- rpds-py=0.10.4=py311h46250e7_0
- scikit-image=0.22.0=py311h320fe9a_2
- scikit-learn=1.3.1=py311hc009520_1
- scipy=1.11.3=py311h64a7726_1
- semantic_version=2.10.0=pyhd8ed1ab_0
- sep=1.2.1=py311h1f0f07a_2
- setuptools=68.2.2=pyhd8ed1ab_0
- shapely=2.0.1=py311he06c224_3
- simplejson=3.19.2=py311h459d7ec_0
- six=1.16.0=pyh6c4a22f_0
- snappy=1.1.10=h9fff704_0
- sniffio=1.3.0=pyhd8ed1ab_0
- snuggs=1.4.7=py_0
- sortedcontainers=2.4.0=pyhd8ed1ab_0
- sqlalchemy=2.0.21=py311h459d7ec_1
- sqlite=3.43.2=h2c6b66d_0
- stack_data=0.6.2=pyhd8ed1ab_0
- svt-av1=1.7.0=h59595ed_0
- sympy=1.12=pypyh9d50eac_103
- tbb=2021.10.0=h00ab1b0_1
- tenacity=8.2.3=pyhd8ed1ab_0
- threadpoolctl=3.2.0=pyha21a80b_0
- tifffile=2023.9.26=pyhd8ed1ab_0
- tiledb=2.16.3=hf0b6e87_3
- tk=8.6.13=h2797004_0
- toml=0.10.2=pyhd8ed1ab_0
- tomli=2.0.1=pyhd8ed1ab_0
- tqdm=4.66.1=pyhd8ed1ab_0
- traitlets=5.11.2=pyhd8ed1ab_0
- typing-extensions=4.8.0=hd8ed1ab_0
- typing_extensions=4.8.0=pyha770c72_0
- tzcode=2023c=h0b41bf4_0
- tzdata=2023c=h71feb2d_0
- tzlocal=5.1=py311h38be061_0
- uriparser=0.9.7=hcb278e6_1
- wcwidth=0.2.8=pyhd8ed1ab_0
- wheel=0.41.2=pyhd8ed1ab_0
- xerces-c=3.2.4=hac6953d_3
- xorg-kbproto=1.0.7=h7f98852_1002
- xorg-libice=1.1.1=hd590300_0
- xorg-libsm=1.2.4=h7391055_0
- xorg-libx11=1.8.6=h8ee46fc_0
- xorg-libxau=1.0.11=hd590300_0
- xorg-libxdmcp=1.1.3=h7f98852_0
- xorg-libxext=1.3.4=h0b41bf4_2
- xorg-libxrender=0.9.11=hd590300_0
- xorg-renderproto=0.11.1=h7f98852_1002
- xorg-xextproto=7.3.0=h0b41bf4_1003
- xorg-xproto=7.0.31=h7f98852_1007
- xz=5.2.6=h166bdaf_0
- yaml=0.2.5=h7f98852_2
- zfp=1.0.0=h59595ed_4
- zipp=3.17.0=pyhd8ed1ab_0
- zlib=1.2.13=hd590300_5
- zlib-ng=2.0.7=h0b41bf4_0
- zstd=1.5.5=hfc55251_0
- pip:
- asciitree==0.3.3
- astropy-healpix==1.0.0
- boto3==1.28.62
- botocore==1.31.62
- cloudpickle==2.2.1
- cosmic-conn==0.4.1
- dask==2023.9.3
- fasteners==0.19
- fsspec==2023.9.2
- kombu==4.6.11
- lcogt-logging==0.3.2
- locket==1.0.0
- logutils==0.3.5
- numcodecs==0.12.0
- ocs-archive==0.2.10
- ocs-ingester==3.0.5
- opensearch-py==1.1.0
- opentsdb-http-client==0.2.0
- opentsdb-python-metrics==0.2.0
- partd==1.4.1
- pretty-errors==1.2.25
- redis==5.0.1
- reproject==0.12.0
- s3transfer==0.7.0
- toolz==0.12.0
- urllib3==1.26.17
- vine==1.3.0
- zarr==2.16.1
prefix: /root/micromamba/envs/banzai
12 changes: 6 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,21 @@ install_requires =
numpy<1.24
cython
mysql-connector-python
lcogt_logging==0.3.2
lcogt_logging
photutils
bottleneck
kombu==4.4.0
amqp==2.6.0
kombu
amqp
requests
opensearch-py==1.0.0
opensearch-py>=1,<2
pytest>=4.0
pyyaml
psycopg2-binary
celery[redis]==4.3.1
celery[redis]>=4.3.1,<5
apscheduler
python-dateutil
ocs_ingester>=3.0.4,<4.0.0
tenacity==6.0.0
tenacity>=8,<=9
python-dateutil
emcee
scikit-image
Expand Down

0 comments on commit 0c0695c

Please sign in to comment.