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

[WIP] Make Docker build script to accept custom base image #373

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tokk-nv
Copy link
Member

@tokk-nv tokk-nv commented Jan 21, 2021

No description provided.


sudo docker build \
--build-arg BASE_IMAGE=$BASE_IMAGE \
-t $JETBOT_DOCKER_REMOTE/jetbot:base-$JETBOT_VERSION-$L4T_VERSION \
-t jetbot/jetbot:base-$JETBOT_VERSION-$L4T_VERSION \
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for removing JETBOT_DOCKER_REMOTE?

Copy link
Member Author

Choose a reason for hiding this comment

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

Did not find this is actually being used, so this is just for simplifying things.

Copy link
Contributor

Choose a reason for hiding this comment

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

It was used previously for hosting/sharing test containers with different remotes (ie: private ones). I'm not sure if we'll need to do this anymore, but may be easiest / safest to leave it as is until we're sure we don't want to revert back.

source ../scripts/l4t-version.sh

if [ -z $BASE_IMAGE ]; then
if [ $L4T_VERSION = "32.4.4" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to drop 32.4.3 which was previously handled in docker/base/build.sh?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, can we move this logic to configure.sh as an environment variable? This is currently where all other docker build configuration is done.

@@ -0,0 +1,49 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see this script used. Can we remove?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is tied to the change above to build.sh.
If we don't take that change above, we don't need this.

then
export JETBOT_DOCKER_REMOTE=jetbot
fi
echo "export L4T_VERSION=$L4T_RELEASE.$L4T_REVISION"
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of deleting JETBOT_DOCKER_REMOTE. I would recommend hard-setting setting a default value of

export JETBOT_DOCKER_REMOTE=jetbot

This is the smallest change to accomplish what I believe the intent was (to handle L4T versions which are not specified here).

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

Copy link
Contributor

@jaybdub jaybdub left a comment

Choose a reason for hiding this comment

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

Have some changes suggested to refactor this to limit scope of the PR to fit title

source ../scripts/l4t-version.sh

if [ -z $BASE_IMAGE ]; then
if [ $L4T_VERSION = "32.4.4" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, can we move this logic to configure.sh as an environment variable? This is currently where all other docker build configuration is done.

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.

2 participants