Skip to content

Commit

Permalink
feat: update and cleaned envs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Nov 6, 2024
1 parent a95dccb commit 6933742
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 329 deletions.
7 changes: 4 additions & 3 deletions api/Dockerfile-api
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ FROM ghcr.io/biosimulators/bio-compose-server-base:latest

SHELL ["/usr/bin/env", "bash", "-c"]

COPY ./ ./
COPY ./ .

EXPOSE 3001

RUN source ~/.bashrc \
&& conda env update -n server -f environment.api.yml \
&& conda env update -n server -f config/environment.api.yml \
&& conda run pip install -e . \
&& conda clean --all --json -y

# RUN source ~/.bashrc \
# && poetry install --without=composition,dev,worker --no-cache

ENTRYPOINT ["bash", "-c", "source ~/.bashrc && uvicorn main:app --host 0.0.0.0 --port 3001 --reload"]
ENTRYPOINT ["bash", "-c", "source ~/.bashrc && conda run uvicorn main:app --host 0.0.0.0 --port 3001 --reload"]

67 changes: 67 additions & 0 deletions api/config/env.api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: server
channels:
- defaults
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
dependencies:
- _libgcc_mutex=0.1
- _openmp_mutex=5.1
- bzip2=1.0.8
- ca-certificates=2024.9.24
- ld_impl_linux-64=2.40
- libffi=3.4.4
- libgcc-ng=11.2.0
- libgomp=11.2.0
- libstdcxx-ng=11.2.0
- libuuid=1.41.5
- ncurses=6.4
- openssl=3.0.15
- python=3.10.15
- readline=8.2
- setuptools=75.1.0
- sqlite=3.45.3
- tk=8.6.14
- tzdata=2024b
- wheel=0.44.0
- xz=5.4.6
- zlib=1.2.13
- pip:
- annotated-types==0.7.0
- anyio==4.6.2.post1
- cachetools==5.5.0
- certifi==2024.8.30
- charset-normalizer==3.4.0
- click==8.1.7
- dnspython==2.7.0
- exceptiongroup==1.2.2
- fastapi==0.115.4
- google-api-core==2.22.0
- google-auth==2.35.0
- google-cloud-core==2.4.1
- google-cloud-storage==2.18.2
- google-crc32c==1.6.0
- google-resumable-media==2.7.2
- googleapis-common-protos==1.65.0
- h11==0.14.0
- idna==3.10
- pip==24.3.1
- proto-plus==1.25.0
- protobuf==5.28.3
- pyasn1==0.6.1
- pyasn1-modules==0.4.1
- pydantic==2.9.2
- pydantic-core==2.23.4
- pydantic-settings==2.6.1
- pymongo==4.10.1
- python-dotenv==1.0.1
- python-multipart==0.0.17
- pyyaml==6.0.2
- requests==2.32.3
- requests-toolbelt==1.0.0
- rsa==4.9
- sniffio==1.3.1
- starlette==0.41.2
- toml==0.10.2
- typing-extensions==4.12.2
- urllib3==2.2.3
- uvicorn==0.32.0
58 changes: 2 additions & 56 deletions api/config/environment.api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,64 +4,10 @@ channels:
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
dependencies:
- _libgcc_mutex=0.1
- _openmp_mutex=5.1
- bzip2=1.0.8
- ca-certificates=2024.9.24
- ld_impl_linux-64=2.40
- libffi=3.4.4
- libgcc-ng=11.2.0
- libgomp=11.2.0
- libstdcxx-ng=11.2.0
- libuuid=1.41.5
- ncurses=6.4
- openssl=3.0.15
- python=3.10.15
- readline=8.2
- setuptools=75.1.0
- sqlite=3.45.3
- tk=8.6.14
- tzdata=2024b
- wheel=0.44.0
- xz=5.4.6
- zlib=1.2.13
- pip
- python=3.10
- pip:
- annotated-types==0.7.0
- anyio==4.6.2.post1
- cachetools==5.5.0
- certifi==2024.8.30
- charset-normalizer==3.4.0
- click==8.1.7
- dnspython==2.7.0
- exceptiongroup==1.2.2
- fastapi==0.115.4
- google-api-core==2.22.0
- google-auth==2.35.0
- google-cloud-core==2.4.1
- google-cloud-storage==2.18.2
- google-crc32c==1.6.0
- google-resumable-media==2.7.2
- googleapis-common-protos==1.65.0
- h11==0.14.0
- idna==3.10
- pip==24.3.1
- proto-plus==1.25.0
- protobuf==5.28.3
- pyasn1==0.6.1
- pyasn1-modules==0.4.1
- pydantic==2.9.2
- pydantic-core==2.23.4
- pydantic-settings==2.6.1
- pymongo==4.10.1
- python-dotenv==1.0.1
- python-multipart==0.0.17
- pyyaml==6.0.2
- requests==2.32.3
- requests-toolbelt==1.0.0
- rsa==4.9
- sniffio==1.3.1
- starlette==0.41.2
- toml==0.10.2
- typing-extensions==4.12.2
- urllib3==2.2.3
- uvicorn==0.32.0
23 changes: 2 additions & 21 deletions assets/docker/config/environment.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,8 @@ channels:
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
dependencies:
- _libgcc_mutex=0.1
- _openmp_mutex=5.1
- bzip2=1.0.8
- ca-certificates=2024.9.24
- ld_impl_linux-64=2.40
- libffi=3.4.4
- libgcc-ng=11.2.0
- libgomp=11.2.0
- libstdcxx-ng=11.2.0
- libuuid=1.41.5
- ncurses=6.4
- openssl=3.0.15
- python=3.10.15
- readline=8.2
- setuptools=75.1.0
- sqlite=3.45.3
- tk=8.6.14
- tzdata=2024b
- wheel=0.44.0
- xz=5.4.6
- zlib=1.2.13
- pip
- python=3.10
- pip:
- annotated-types==0.7.0
- anyio==4.6.2.post1
Expand Down
25 changes: 4 additions & 21 deletions worker/Dockerfile-worker
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,13 @@ FROM ghcr.io/biosimulators/bio-compose-server-base:latest

SHELL ["/usr/bin/env", "bash", "-c"]

COPY ./ ./
COPY ./ .
# COPY ../assets/docker/config/environment.base.yml ../assets/docker/config/environment.worker.yml .

ENV TEST_SBML_FP="test_fixtures/Elowitz-Nature-2000-Repressilator/BIOMD0000000012_url.xml" \
TEST_PSC_FP="/Pysces/psc/BIOMD0000000012_url.xml.psc" \
TEST_OMEX_FP="test_fixtures/Elowitz-Nature-2000-Repressilator.omex"

# os deps
# RUN source ~/.bashrc \
# && apt-get update \
# && apt-get install -y \
# meson \
# g++ \
# gfortran \
# libblas-dev \
# liblapack-dev \
# libgfortran5 \
# && conda install -c conda-forge -c pysces pysces -y \
# && conda env update -n conda-env -f config/environment.worker.yml \
# && poetry install --only=worker --no-cache \
# && rm -rf config \
# && rm -rf /var/lib/apt/lists/* \
# && apt-get autoremove -y \
# && apt-get clean

# TODO: perhaps run --no-install-recommends?
RUN source ~/.bashrc \
&& apt-get update \
Expand Down Expand Up @@ -63,7 +45,8 @@ RUN source ~/.bashrc \
libboost-chrono-dev \
libboost-math-dev \
libboost-serialization-dev \
&& conda env update -n server -f environment.worker.yml \
&& conda env update -n server -f config/environment.worker.yml \
&& conda run pip install -e . \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get autoremove -y \
&& apt-get clean \
Expand All @@ -74,7 +57,7 @@ RUN source ~/.bashrc \
# && conda install "numpy<1.22.0" \
# && conda run pip install amici biosimulators-amici --root-user-action=ignore \
# && rm -rf config \
ENTRYPOINT ["bash", "-c", "source ~/.bashrc && python3 main.py"]
ENTRYPOINT ["bash", "-c", "source ~/.bashrc && conda run python3 main.py"]

# --root-user-action=ignore
#############################
Expand Down
Loading

0 comments on commit 6933742

Please sign in to comment.