-
-
Save gonzalocasas/6202fb57ae39948744d4b36767d6908a to your computer and use it in GitHub Desktop.
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
version: "3.9" | |
services: | |
compas_rpc: | |
build: . | |
ports: | |
- "1753:1753" |
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
FROM continuumio/miniconda3 AS build | |
COPY environment.yml . | |
RUN conda env create -f environment.yml | |
RUN conda install -c conda-forge conda-pack | |
# Use conda-pack to create a standalone enviornment | |
RUN conda-pack -n compas -o /tmp/env.tar && \ | |
mkdir /venv && cd /venv && tar xf /tmp/env.tar && \ | |
rm /tmp/env.tar | |
RUN /venv/bin/conda-unpack | |
# Runtime-stage image | |
FROM debian:buster-slim AS runtime | |
COPY --from=build /venv /venv | |
SHELL ["/bin/bash", "-c"] | |
EXPOSE 1753 | |
ENTRYPOINT source /venv/bin/activate && \ | |
compas_rpc start --no-autoreload |
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
name: compas | |
channels: | |
- conda-forge | |
dependencies: | |
- python=3.8 | |
- compas=1.* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment