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] Add multicore support to "make" and "bundler" #4544

Merged
merged 2 commits into from Aug 7, 2017

Conversation

@ThomasLeister
Copy link
Contributor

commented Aug 7, 2017

These changes add multicore support for make and bundler so docker-compose build time is decreased on multicore machines.

@ThomasLeister ThomasLeister changed the title Add multicore support to "make" and "bundler" [Docker] Add multicore support to "make" and "bundler" Aug 7, 2017
Dockerfile Outdated
&& make install \
&& libtool --finish /usr/local/lib \
&& cd /mastodon \
&& rm -rf /tmp/* /var/cache/apk/*

COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/

RUN bundle config build.nokogiri --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include \
RUN bundle config build.nokogiri --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include --jobs $(getconf _NPROCESSORS_ONLN)\

This comment has been minimized.

Copy link
@ykzts

ykzts Aug 7, 2017

Collaborator

This is an option used in build for Nokogiri. Is it okay to add it here?

This comment has been minimized.

Copy link
@ThomasLeister

ThomasLeister Aug 7, 2017

Author Contributor

I'm not a Ruby / Bundler expert, but according to this article: https://robots.thoughtbot.com/parallel-gem-installing-using-bundler the --jobs option can be applied to most bundler config commands. Worked for me.

This comment has been minimized.

Copy link
@ykzts

ykzts Aug 7, 2017

Collaborator

Yes, but that line is not bundle install.

This comment has been minimized.

Copy link
@ThomasLeister

ThomasLeister Aug 7, 2017

Author Contributor

https://bundler.io/v1.5/whats_new.html

The --jobs option (-j for short) installs gems in parallel. For example, bundle install -j4 will use 4 workers. We've seen speedups of 40-60% on fresh bundle installs. To always install in parallel, run bundle config --global jobs 4 or set BUNDLE_JOBS

Okay, let me better add the -j option to the "bundle install" command.

@ykzts
ykzts approved these changes Aug 7, 2017
Copy link
Collaborator

left a comment

cool!

@ykzts ykzts added the deployment label Aug 7, 2017
@Gargron Gargron merged commit 5d408fd into tootsuite:master Aug 7, 2017
2 checks passed
2 checks passed
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
ykzts added a commit that referenced this pull request Aug 7, 2017
Gargron added a commit that referenced this pull request Aug 7, 2017
* Revert "Adjust tags and accounts page (#4534)"

This reverts commit a3e53bd.

* Revert "feat: Cache status height to avoid expensive renders (#4439)"

This reverts commit 8eb6d17.

* Revert "Refactor Avatar and AvatarOverlay to have 'account' as prop instead of src and staticSrc (#4526)"

This reverts commit 5942347.

* Revert "Update dependencies for Ruby (#4543)"

This reverts commit 22db947.

* Revert "[Docker] Add multicore support to "make" and "bundler" (#4544)"

This reverts commit 5d408fd.

* Revert "It makes no sense to try using invalid or expired link again (#4521)"

This reverts commit 47579ec.

* Revert "i18n: Update Polish translation (#4545)"

This reverts commit 3363a05.

* Revert "Set false to animated options for thumbnail processor (#4547)"

This reverts commit 87f10d4.
YaQ00 added a commit to YaQ00/mastodon that referenced this pull request Sep 5, 2017
* Let make and bundler use multiple cores

* Adds -j option to bundle install instead of bundle config
YaQ00 added a commit to YaQ00/mastodon that referenced this pull request Sep 5, 2017
…uite#4550)

* Revert "Adjust tags and accounts page (tootsuite#4534)"

This reverts commit a3e53bd.

* Revert "feat: Cache status height to avoid expensive renders (tootsuite#4439)"

This reverts commit 8eb6d17.

* Revert "Refactor Avatar and AvatarOverlay to have 'account' as prop instead of src and staticSrc (tootsuite#4526)"

This reverts commit 5942347.

* Revert "Update dependencies for Ruby (tootsuite#4543)"

This reverts commit 22db947.

* Revert "[Docker] Add multicore support to "make" and "bundler" (tootsuite#4544)"

This reverts commit 5d408fd.

* Revert "It makes no sense to try using invalid or expired link again (tootsuite#4521)"

This reverts commit 47579ec.

* Revert "i18n: Update Polish translation (tootsuite#4545)"

This reverts commit 3363a05.

* Revert "Set false to animated options for thumbnail processor (tootsuite#4547)"

This reverts commit 87f10d4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.