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

Docker small fixes #574

Merged
merged 7 commits into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
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
13 changes: 9 additions & 4 deletions docker/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@
. ~/.git-prompt.sh

[ -f ~/.bash_aliases ] && . ~/.bash_aliases
export PS1='sirf:\w$(__git_ps1)\$ '

#export PS1='sirf:\w$(__git_ps1)\$ '
# play safe with an innocent prompt that also works in the Bourne shell
export PS1='sirf$ '
# Python (virtualenv)
[ -f /opt/pyvenv/bin/activate ] && . /opt/pyvenv/bin/activate

# SIRF env
[ -f /opt/SIRF-SuperBuild/INSTALL/bin/env_ccppetmr.sh ] && \
. /opt/SIRF-SuperBuild/INSTALL/bin/env_ccppetmr.sh
[ -f /opt/SIRF-SuperBuild/INSTALL/bin/env_sirf.sh ] && \
. /opt/SIRF-SuperBuild/INSTALL/bin/env_sirf.sh

# Need to add this as we have built using some of these shared libraries
# See https://github.com/SyneRBI/SIRF-SuperBuild/issues/573
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/pyvenv/lib

# .local/bin (used by pip for instance)
export PATH="${PATH}:~/.local/bin"
Expand Down
3 changes: 3 additions & 0 deletions docker/.profile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ if [ -n "$BASH_VERSION" ]; then
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
else
# .local/bin (used by pip for instance)
PATH="${PATH}:~/.local/bin"
fi
6 changes: 5 additions & 1 deletion docker/build_system-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ set -ev
# SIRF external dependencies
apt-get update -qq
apt-get install -yq --no-install-recommends \
libboost-all-dev \
libboost-dev libboost-chrono-dev \
libboost-filesystem-dev libboost-thread-dev \
libboost-date-time-dev libboost-regex-dev \
libboost-program-options-dev libboost-atomic-dev \
libboost-test-dev libboost-timer-dev \
Comment on lines +6 to +10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't we decide to remove these packages?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied the list from the VM. Not 100% sure if we still need all of them, but definitely most of them.

The previous version installed all the boost libraries, which is considerably more

libfftw3-dev \
libhdf5-serial-dev \
swig
Expand Down
7 changes: 4 additions & 3 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ if [ -d $HOME ]; then
exec gosu $mainUser "$@"
fi

cd /
# allow docker exec into already started container
[ -d $OLD_HOME ] && mv $OLD_HOME $HOME
# We need to copy files from /home-away to new home and create the user

# copy files
[ -d $OLD_HOME ] && cp -r $OLD_HOME $HOME
cd $HOME

echo "Creating $mainUser:$USER_ID:$GROUP_ID"
Expand Down
5 changes: 0 additions & 5 deletions docker/user_sirf-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@ cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS $COMPILER_FLAGS .

cmake --build . -j 2

[ -f INSTALL/share/gadgetron/config/gadgetron.xml ] || \
[ -f INSTALL/share/gadgetron/config/gadgetron.xml.example ] && \
mv INSTALL/share/gadgetron/config/gadgetron.xml.example \
INSTALL/share/gadgetron/config/gadgetron.xml

popd