Skip to content

Commit

Permalink
WIP Dockerfile for grpc4bmi
Browse files Browse the repository at this point in the history
  • Loading branch information
BSchilperoort committed Jan 10, 2024
1 parent 4d5eb7c commit 98fbcff
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

FROM ghcr.io/ecoextreml/stemmus_scope:1.5.0
LABEL org.opencontainers.image.source = "https://github.com/EcoExtreML/STEMMUS_SCOPE_Processing"

# Requirements for building Python 3.10
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev \
libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev

# Get Python source and compile
WORKDIR /python
RUN wget https://www.python.org/ftp/python/3.10.12/Python-3.10.12.tgz --no-check-certificate
RUN tar -xf Python-3.10.*.tgz
WORKDIR /python/Python-3.10.12
RUN ./configure --prefix=/usr/local --enable-optimizations --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
RUN make -j $(nproc)
RUN make altinstall
WORKDIR /

# Pip install PyStemmusScope and dependencies
COPY . /opt/PyStemmusScope
RUN pip3.10 install /opt/PyStemmusScope/[docker]
RUN pip3.10 install grpc4bmi==0.5.0

# Set the STEMMUS_SCOPE environmental variable, so the BMI can find the executable
WORKDIR /
ENV STEMMUS_SCOPE ./STEMMUS_SCOPE

# Start grpc4bmi server
CMD run-bmi-server --name "PyStemmusScope.bmi.StemmusScopeBmi" --port 55555 --debug

0 comments on commit 98fbcff

Please sign in to comment.