Skip to content

Data fetched at docker run to decrease container size#1332

Merged
bgruening merged 9 commits intogalaxyproject:masterfrom
bedroesb:dockerfix
Sep 25, 2019
Merged

Data fetched at docker run to decrease container size#1332
bgruening merged 9 commits intogalaxyproject:masterfrom
bedroesb:dockerfix

Conversation

@bedroesb
Copy link
Contributor

At image build, docker build -t containername -f topics/topicname/docker/Dockerfile ., only the data-library.yaml files are merged, the way it used to, but the data itself is not downloaded.

When you use the normal run command docker run -p "8080:80" containername the container will run without the example data.
When the command docker run -p "8080:80" containername -d is used, the corresponding data libraries of that topic will be downloaded and accessible within the training environment.

This reduces the size of the images enormously, enabling them to be uploaded to docker hub or quay.io

@bedroesb
Copy link
Contributor Author

if this idea will be implemented, we should also change planemo to generate the new docker files with the new

ADD bin/datalibrarydownload.sh /datalibrarydownload.sh
ENTRYPOINT ["/datalibrarydownload.sh"]

lines

@bedroesb
Copy link
Contributor Author

@bgruening What do you think of this implementation? Or would you still prefer to incorporate this function inside the galaxy-stable base image.

@bebatut
Copy link
Member

bebatut commented Sep 12, 2019

@bgruening do you think it is ready to go?

@bgruening
Copy link
Member

I think this is a good improvement. @bedroesb can you fix the merge conflict?

@bedroesb
Copy link
Contributor Author

@bgruening I will, and I will also re-check everything

@bedroesb bedroesb requested review from a team and abretaud as code owners September 13, 2019 09:33
@bedroesb bedroesb requested review from a team as code owners September 13, 2019 09:33
@bedroesb bedroesb requested review from a team as code owners September 24, 2019 12:16
@bedroesb
Copy link
Contributor Author

bedroesb commented Sep 25, 2019

@bgruening I checked the building of several topics, and it works like a charm. Only concern: when I wanted to build the containers in windows, I had some line ending problems in the bash scripts. (although on github LF is used ... ). But that is a windows thingy.. I think it can be merged. Biggest container now is 28 gig for transcriptomics (compared to ~80 before this update).

Copy link
Member

@bgruening bgruening left a comment

Choose a reason for hiding this comment

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

Thanks @bedroesb, just one small comment.

ADD bin/datalibrarydownload.sh /datalibrarydownload.sh
RUN /setup-tutorials.sh

ENTRYPOINT ["/datalibrarydownload.sh"] No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

That is a little bit nitpicking, but could you call this script data_libarary_download.sh. Its a little bit more readbale.

@bedroesb
Copy link
Contributor Author

@bgruening Done !

@bgruening bgruening merged commit 13bd091 into galaxyproject:master Sep 25, 2019
@bgruening
Copy link
Member

Merci!

@bgruening
Copy link
Member

@bedroesb you might want to inform Frederik about this. He probably wants to put this in some fancy GDoc for ELIXIR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants