Skip to content

Commit

Permalink
Updated cloud image
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelRobidas committed Apr 18, 2024
1 parent 7318d4b commit 2e791f4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions Cloud_dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ COPY bin /binaries/xtb
COPY scripts /calcus/scripts
RUN python /calcus/scripts/extract_xtb.py

RUN apt update && apt install build-essential gcc libxm4 libgl1 libmagic1 -y

ADD ./cloud_requirements.txt /calcus/cloud_requirements.txt
RUN pip install -r /calcus/cloud_requirements.txt

FROM python:3.9-slim-bookworm AS calcus_user

COPY --from=0 /binaries/ /binaries/
Expand All @@ -14,10 +19,9 @@ ENV CALCUS_VERSION_HASH=${CALCUS_VERSION_HASH}
ENV PYTHONUNBUFFERED 1
ENV CALCUS_CLOUD True

RUN apt update && apt install openbabel postgresql-client dos2unix nwchem libxm4 libgl1 libmagic1 -y
COPY --from=0 /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages

ADD ./cloud_requirements.txt /calcus/cloud_requirements.txt
RUN pip install -r /calcus/cloud_requirements.txt
RUN apt update && apt install openbabel postgresql-client dos2unix nwchem libxm4 libgl1 libmagic1 -y

COPY calcus /calcus/calcus
COPY frontend /calcus/frontend
Expand All @@ -35,4 +39,4 @@ ENV PATH=$PATH:$XTB4STDAHOME/xtb/bin:$XTB4STDAHOME

RUN adduser --disabled-password --gecos '' calcus

CMD exec gunicorn calcus.wsgi:application --bind :$PORT --timeout 10 --workers $NUM_WORKERS --threads $NUM_THREADS --timeout $GUNICORN_TIMEOUT
CMD exec python -m gunicorn calcus.wsgi:application --bind :$PORT --timeout 10 --workers $NUM_WORKERS --threads $NUM_THREADS --timeout $GUNICORN_TIMEOUT
2 changes: 1 addition & 1 deletion cloud_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ nmrglue==0.8
numpy
periodictable
psutil==5.7.2
psycopg2
psycopg2-binary
pysisyphus
python-magic
rdkit
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ paramiko==3.4.0
periodictable
pre-commit
psutil==5.7.2
psycopg2
psycopg2-binary
pysisyphus
python-magic
rdkit
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ python scripts/wait_for_postgres.py
./scripts/migrate.sh
python manage.py check_su

gunicorn calcus.wsgi:application --bind 0.0.0.0:8000 --access-logfile=- --error-logfile=- --reload --timeout $GUNICORN_TIMEOUT --keep-alive $GUNICORN_TIMEOUT
python -m gunicorn calcus.wsgi:application --bind 0.0.0.0:8000 --access-logfile=- --error-logfile=- --reload --timeout $GUNICORN_TIMEOUT --keep-alive $GUNICORN_TIMEOUT

0 comments on commit 2e791f4

Please sign in to comment.