Skip to content

Commit

Permalink
Merge branch 'materialsproject:main' into taskdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
esoteric-ephemera authored Apr 10, 2024
2 parents c644899 + 463c1a2 commit b0915f3
Show file tree
Hide file tree
Showing 26 changed files with 889 additions and 821 deletions.
145 changes: 77 additions & 68 deletions docs/CHANGELOG.md

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions emmet-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM materialsproject/devops:python-3.1010.24 as base
FROM materialsproject/devops:python-3.1013.7 as base
RUN apt-get update && apt-get install -y --no-install-recommends libopenblas-dev libjpeg62 && apt-get clean

FROM base as builder
Expand All @@ -8,14 +8,14 @@ WORKDIR /emmet-api
ENV PIP_FLAGS "--user --no-cache-dir --compile"
COPY requirements/deployment.txt ./requirements.txt
RUN pip install $PIP_FLAGS --upgrade pip pip-tools setuptools-scm && \
pip-sync requirements.txt --pip-args "$PIP_FLAGS"
pip-sync requirements.txt --pip-args "$PIP_FLAGS"

COPY emmet emmet
COPY setup.py .
ARG API_VERSION
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${API_VERSION} pip install $PIP_FLAGS --no-deps .
RUN wget -q https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && \
chmod +x wait-for-it.sh && mv wait-for-it.sh /root/.local/bin/
chmod +x wait-for-it.sh && mv wait-for-it.sh /root/.local/bin/

FROM base
COPY --from=builder /root/.local/lib/python3.10/site-packages /root/.local/lib/python3.10/site-packages
Expand All @@ -25,18 +25,18 @@ COPY --from=builder /emmet-api /emmet-api
WORKDIR /emmet-api
ARG VERSION
ENV PATH=/root/.local/bin:$PATH \
PYTHONUNBUFFERED=1 \
FLASK_APP=emmet-api \
FLASK_ENV=production \
PORT=10001 \
NUM_WORKERS=4 \
RELOAD="" \
MAX_REQUESTS=0 \
MAX_REQUESTS_JITTER=0 \
DD_TRACE_HOST=localhost:8126 \
DD_SERVICE=next-gen-api \
DD_ENV=prod \
DD_VERSION=$VERSION
PYTHONUNBUFFERED=1 \
FLASK_APP=emmet-api \
FLASK_ENV=production \
PORT=10001 \
NUM_WORKERS=4 \
RELOAD="" \
MAX_REQUESTS=0 \
MAX_REQUESTS_JITTER=0 \
DD_TRACE_HOST=localhost:8126 \
DD_SERVICE=next-gen-api \
DD_ENV=prod \
DD_VERSION=$VERSION

COPY app.py .
COPY material_resources.py .
Expand All @@ -47,4 +47,4 @@ RUN chmod +x start.sh
LABEL com.datadoghq.ad.logs='[{"source": "gunicorn", "service": "next-gen-api"}]'

EXPOSE 10001 20001
CMD wait-for-it.sh $DD_TRACE_HOST -q -s -t 60 -- ./start.sh
CMD ./start.sh
30 changes: 15 additions & 15 deletions emmet-api/requirements/deployment.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ bcrypt==4.1.2
# via paramiko
blinker==1.7.0
# via flask
boto3==1.34.74
boto3==1.34.81
# via
# emmet-api (emmet/emmet-api/setup.py)
# maggma
botocore==1.34.74
botocore==1.34.81
# via
# boto3
# s3transfer
Expand All @@ -49,37 +49,37 @@ click==8.1.7
# flask
# mongogrant
# uvicorn
contourpy==1.2.0
contourpy==1.2.1
# via matplotlib
cryptography==42.0.5
# via paramiko
cycler==0.12.1
# via matplotlib
ddsketch==3.0.1
# via ddtrace
ddtrace==2.7.5
ddtrace==2.8.0
# via emmet-api (emmet/emmet-api/setup.py)
deprecated==1.2.14
# via opentelemetry-api
dnspython==2.6.1
# via
# maggma
# pymongo
emmet-core==0.81.1
emmet-core==0.82.1
# via emmet-api (emmet/emmet-api/setup.py)
envier==0.5.1
# via ddtrace
exceptiongroup==1.2.0
# via
# anyio
# cattrs
fastapi==0.110.0
fastapi==0.110.1
# via
# emmet-api (emmet/emmet-api/setup.py)
# maggma
flask==3.0.2
flask==3.0.3
# via mongogrant
fonttools==4.50.0
fonttools==4.51.0
# via matplotlib
future==1.0.0
# via uncertainties
Expand All @@ -101,7 +101,7 @@ jmespath==1.0.1
# via
# boto3
# botocore
joblib==1.3.2
joblib==1.4.0
# via pymatgen
jsonschema==4.21.1
# via maggma
Expand All @@ -117,7 +117,7 @@ markupsafe==2.1.5
# via
# jinja2
# werkzeug
matplotlib==3.8.3
matplotlib==3.8.4
# via
# -r python/requirements.txt
# pymatgen
Expand All @@ -134,7 +134,7 @@ mpmath==1.3.0
# via sympy
msgpack==1.0.8
# via maggma
networkx==3.2.1
networkx==3.3
# via pymatgen
numpy==1.26.4
# via
Expand Down Expand Up @@ -239,7 +239,7 @@ ruamel-yaml-clib==0.2.8
# via ruamel-yaml
s3transfer==0.10.1
# via boto3
scipy==1.12.0
scipy==1.13.0
# via
# -r python/requirements.txt
# pymatgen
Expand All @@ -265,7 +265,7 @@ sqlparse==0.4.4
# via ddtrace
sshtunnel==0.4.0
# via maggma
starlette==0.36.3
starlette==0.37.2
# via fastapi
sympy==1.12
# via pymatgen
Expand All @@ -277,7 +277,7 @@ tqdm==4.66.2
# via
# maggma
# pymatgen
typing-extensions==4.10.0
typing-extensions==4.11.0
# via
# anyio
# asgiref
Expand All @@ -299,7 +299,7 @@ urllib3==2.2.1
# requests
uvicorn==0.29.0
# via maggma
werkzeug==3.0.1
werkzeug==3.0.2
# via flask
wrapt==1.16.0
# via deprecated
Expand Down
Loading

0 comments on commit b0915f3

Please sign in to comment.