-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor: update Dockerfile for IFTPipeline.jl #174
Open
hollandjg
wants to merge
45
commits into
jghrefactor/A-gather-julia-package-in-new-directory
Choose a base branch
from
jghrefactor/A1-update-dockerfile
base: jghrefactor/A-gather-julia-package-in-new-directory
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
3797150
move cli file to src directory
hollandjg bd4ea2a
update dockerfile to use the new path to CLI file
hollandjg 5c299cf
re-add shell
hollandjg 72d9835
quote variables in entrypoint
hollandjg ce51c79
reorder dockerfile to reduce time taken to rerun
hollandjg 529bb5b
update comments
hollandjg 597a143
update dockerfile
hollandjg 202f51b
broken setup of Dockerfile – libcurl doesn't work when loading pycall…
hollandjg c892048
add missing serialization dependency
hollandjg c8e316c
update dockerfile to include installing conda from an environment file
hollandjg 3b4d7e4
move sample tracker params into test directory
hollandjg 4ca166e
fix crash on testing when we're not running cli.jl directly
hollandjg d8a6afd
move cli-config code into cli
hollandjg db2f3d3
remove commented code in dockerfile
hollandjg 43f4187
make a setup-python script which handles setting up the python enviro…
hollandjg 998a1d4
remove extra newline
hollandjg 5201494
Revert "make a setup-python script which handles setting up the pytho…
hollandjg 7954d0e
add entrypoint to go straight to IFT
hollandjg c76c250
simplify the python setup using an additional little package
hollandjg 5dea3b9
update dockerfile to test the package in a separate step
hollandjg b616969
remove extra ARGS variable not working in Docker
hollandjg 9f46fdb
fix julia call at Entrypoign
hollandjg da9da46
delete unneeded requirements.txt
hollandjg 541b802
fix passing arguments directly to entrypoint
hollandjg 9f0b18d
remove variables which don't always work
hollandjg f08a755
remove additional installs, not required for tests to pass
hollandjg 4c634e7
remove updates – just go straight to the base image for reproducible …
hollandjg 5259d4b
update testing script to set up python correctly
hollandjg a6f7ec1
switch soit to running under pipx
hollandjg 974817e
remove some unneeded dependencies from the Python environment
hollandjg 0dc490c
add missing line-end
hollandjg 4c31827
add missing newline
hollandjg 87d31ee
Merge branch 'jghrefactor/A-gather-julia-package-in-new-directory' in…
hollandjg cd53c53
Merge branch 'jghrefactor/A-gather-julia-package-in-new-directory' in…
hollandjg 2393717
Merge branch 'jghrefactor/A1-update-dockerfile' of https://github.com…
hollandjg 7b4e7f1
Merge branch 'jghrefactor/A-gather-julia-package-in-new-directory' in…
hollandjg 4879887
back-out changes made to soit
hollandjg 2311c74
Merge branch 'jghrefactor/A1-update-dockerfile' of https://github.com…
hollandjg 5298c69
add missing import
hollandjg c3b9790
back-out removal of requirements.txt (moved to new PR)
hollandjg c8b9a59
Merge branch 'jghrefactor/D-update-conda-environment-setup' into jghr…
hollandjg 504eea4
remove duplicate python setup package
hollandjg b0542f8
use updated python setup package name in docker and workflows
hollandjg c3636cb
add IFT from main branch rather than from registry for Docker build
tdivoll 5d69bc0
Merge branch 'jghrefactor/A-gather-julia-package-in-new-directory' in…
hollandjg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -1,27 +1,23 @@ | ||
FROM julia:1.9-bookworm | ||
ENV TERM=xterm | ||
ENV JULIA_PROJECT=/opt/ice-floe-tracker-pipeline | ||
ENV JULIA_DEPOT_PATH=/opt/julia | ||
ENV JULIA_PKGDIR=/opt/julia | ||
ENV JULIA_BUILD='ENV["PYTHON"]=""; using Pkg; Pkg.build()' | ||
ENV IFTPIPELINE_REPO='https://github.com/WilhelmusLab/ice-floe-tracker-pipeline.git' | ||
ENV LOCAL_PATH_TO_IFT_CLI='/usr/local/bin/ice-floe-tracker.jl' | ||
|
||
WORKDIR /opt | ||
FROM julia:1.11-bookworm | ||
|
||
# DEPENDENCIES | ||
#=========================================== | ||
RUN apt-get -y update && \ | ||
apt-get install -y git python3.10 && \ | ||
rm -rf /var/lib/apt/list/* | ||
ENV TERM=xterm | ||
|
||
# Julia package build | ||
# Python environment build | ||
#=========================================== | ||
COPY ./PythonSetupForIFTPipeline.jl /opt/PythonSetupForIFTPipeline.jl | ||
RUN julia --project="/opt/PythonSetupForIFTPipeline.jl" "/opt/PythonSetupForIFTPipeline.jl/setup.jl" | ||
|
||
RUN git clone --single-branch --branch main --depth 1 ${IFTPIPELINE_REPO} | ||
RUN /usr/local/julia/bin/julia --project=${JULIA_PROJECT} -e ${JULIA_BUILD} | ||
RUN /usr/local/julia/bin/julia --project=${JULIA_PROJECT} -e 'using Pkg; Pkg.instantiate()' | ||
COPY workflow/scripts/ice-floe-tracker.jl ${LOCAL_PATH_TO_IFT_CLI} | ||
RUN chmod a+x ${LOCAL_PATH_TO_IFT_CLI} | ||
ENV JULIA_DEPOT_PATH="/usr/local/bin/julia:$JULIA_DEPOT_PATH" | ||
CMD [ "/bin/bash", "-c" ] | ||
# IFT Pipeline package build | ||
#=========================================== | ||
COPY ./IFTPipeline.jl /opt/IFTPipeline.jl | ||
RUN julia --project="/opt/IFTPipeline.jl" -e 'using Pkg; Pkg.rm("IceFloeTracker"); Pkg.add(url="https://github.com/WilhelmusLab/IceFloeTracker.jl", rev="main"); Pkg.instantiate()' | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hollandjg take another look at this. |
||
# Test the package | ||
RUN julia --project="/opt/IFTPipeline.jl" -e 'using Pkg; Pkg.test();' | ||
|
||
# CLI setup | ||
#=========================================== | ||
SHELL ["/bin/bash", "-c"] | ||
ENTRYPOINT ["julia", "--project=/opt/IFTPipeline.jl", "/opt/IFTPipeline.jl/src/cli.jl" ] |
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
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to confirm that line 15 indeed gives us python 3.11 and IFT 0.60: