-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d5eb7c
commit 98fbcff
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
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
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 |