Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the orbdetpy Dockerfile to install all dependencies - this can… #23

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 35 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,50 @@
# A Dockerfile that will allow you install any version of
# this repository with all its dependencies as well as install
# the screening algorithm, caspy.
FROM ubuntu:20.04

# Use --build-arg #.#.# when building to use other version
ARG JAVA_MAJOR_VERSION=11
ARG ORBDETPY_VERSION=2.1.0
ARG ORBDETPY_BRANCH=114067883eb7d5164593d68e5823a739e4fbba73
ARG CASPY_BRANCH=8d20a2d86036dde9f7c853914464388c6a325011
ARG OS_CPU_TYPE=linux-x86_64
ARG ORBDETPY_GIT_LINK=https://github.com/ut-astria/orbdetpy.git
ARG OREKIT_GIT_LINK=https://github.com/ut-astria/orbdetpy/releases/download/2.1.0/orekit-data.tar.gz
ARG CASPY_GIT_LINK=https://github.com/ut-astria/caspy.git

ENV HOME=/root

# Install orbdetpy dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
openjdk-${JAVA_MAJOR_VERSION}-jdk software-properties-common python3-pip python3-venv wget && \
openjdk-${JAVA_MAJOR_VERSION}-jdk software-properties-common python3-pip python3.9-venv wget \
git maven openssh-server curl && \
add-apt-repository ppa:deadsnakes/ppa

# Install orbdetpy into virtual environment and update orekit-data
RUN cd && \
python3 -m venv env_orbdetpy && \
python3.9 -m venv env_orbdetpy && \
. env_orbdetpy/bin/activate && \
pip install orbdetpy==${ORBDETPY_VERSION} ipython && \
pip install ipython && \
git clone ${ORBDETPY_GIT_LINK} && \
cd orbdetpy && \
git checkout ${ORBDETPY_BRANCH} && \
cd orbdetpy && \
wget -O orekit-data ${OREKIT_GIT_LINK} && \
tar -xzvf orekit-data && \
mvn -e -Dos.detected.classifier=${OS_CPU_TYPE} package && \
cd ${HOME} && \
# Prevents bdist_wheel pip error
pip install wheel && \
pip install -e orbdetpy/ && \
python -c "from orbdetpy.astro_data import update_data; update_data();"

RUN cd && \
wget -qO- https://github.com/ut-astria/orbdetpy/archive/refs/tags/${ORBDETPY_VERSION}.tar.gz | \
tar -xvz -C /root/ && \
mv orbdet* orbdetpy
# Clone caspy
RUN cd ${HOME} && \
git clone ${CASPY_GIT_LINK} && \
cd caspy && \
git checkout ${CASPY_BRANCH} && \
. ${HOME}/env_orbdetpy/bin/activate && \
pip install -r requirements.txt

ENTRYPOINT . ${HOME}/env_orbdetpy/bin/activate