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

Improvements in Dockerfile.deps for better reusability in a non-docker environment #2686

Merged
merged 1 commit into from Feb 19, 2021

Conversation

jantonguirao
Copy link
Contributor

@jantonguirao jantonguirao commented Feb 17, 2021

Signed-off-by: Joaquin Anton janton@nvidia.com

Why we need this PR?

Pick one, remove the rest

  • Refactoring Dockerfile.deps to improve reusability in non-docer environments.
    When setting a new bare metal development environment, we typically refer to Dockerfile.deps and copy RUN commands that
    download, build and install some dependencies. Some of those snippets work directly on the root directory and assume root privileges. We typically have to manually modify the snippets so that they are suitable for a bare-metal non-root user environment.

What happened in this PR?

Fill relevant points, put NA otherwise. Replace anything inside []

  • What solution was applied:
    Work on /tmp instead of /
    Separate make from make install commands so that the user can easily add sudo to the latter only.
  • Affected modules and functionalities:
    Dockerfile.deps
  • Key points relevant for the review:
    Dockerfile.deps
  • Validation and testing:
    Tested locally
  • Documentation (including examples):
    NA

JIRA TASK: [Use DALI-XXXX or NA]

…n a non-docker environment

Signed-off-by: Joaquin Anton <janton@nvidia.com>
Comment on lines +58 to +59
make -j"$(grep ^processor /proc/cpuinfo | wc -l)" 2>&1 > /dev/null && \
make install 2>&1 > /dev/null && \
Copy link
Contributor

Choose a reason for hiding this comment

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

I see the value of moving to tmp, but why split build and install stages?

Copy link
Contributor

Choose a reason for hiding this comment

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

Now I see

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As a user I wouldn't like to build as sudo, because all the generated files will be owned by root. I think it is cleaner to first build and then install as sudo.

@jantonguirao jantonguirao assigned JanuszL, klecki and banasraf and unassigned klecki Feb 17, 2021
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2085599]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2085599]: BUILD PASSED

@jantonguirao jantonguirao merged commit 8ace619 into NVIDIA:master Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants