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

separate x86, ARM, Jetson Dockerfiles #49

Closed
wants to merge 4 commits into from
Closed

Conversation

atar13
Copy link
Member

@atar13 atar13 commented Nov 3, 2023

We incorrectly assumed that you needed separate Dockerfiles for devcontainers and just running an application. VS Code will ignore whatever files you COPY into the container and just mount the files of the project at /workspaces/project-name. It also doesn't seem to run whatever command is specified with CMD or ENTRYPOINT.

Now the devcontainer.json file points to the Dockerfile at the root of the repository.

Also, when we have more Dockerfiles for ARM machines or the Jetson, we can have them all be in the root of the project.

We incorrectly assumed that you needed separate Dockerfiles for
devcontainers and just running an application. VS Code will ignore
whatever files you COPY into the container and just mount the files of
the project at /workspaces/project-name. It also doesn't seem to run
whatever command is specified with CMD or ENTRYPOINT.

Now the devcontainer.json file points to the Dockerfile at the root of
the repository.

Also, when we have more Dockerfiles for ARM machines or the Jetson, we
can have them all be in the root of the project.
Copy link
Contributor

@Samir-Rashid Samir-Rashid left a comment

Choose a reason for hiding this comment

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

Thank you for researching this change.
But I disagree. This is going to pollute the root with 3 Dockerfiles (x86, arm, Jetson). I think we should keep all files in this folder.
We will also want to add a .env files with variables for all the URLs are using to be shared among the Dockerfiles.

@atar13
Copy link
Member Author

atar13 commented Nov 3, 2023

Thank you for researching this change.

But I disagree. This is going to pollute the root with 3 Dockerfiles (x86, arm, Jetson). I think we should keep all files in this folder.

I agree that we shouldn't pollute the root. However I don't like having them in the dev container folder since they're not used just for dev containers. These Dockeriles will define the way we run the application.

On the GCS we use the Go standard of putting them in build/package. Unfortunately that won't work since build is taken by cmake. Maybe we can compromise on a docker folder.

@Tyler-Lentz
Copy link
Contributor

Tyler-Lentz commented Nov 3, 2023

Thank you for researching this change.
But I disagree. This is going to pollute the root with 3 Dockerfiles (x86, arm, Jetson). I think we should keep all files in this folder.

I agree that we shouldn't pollute the root. However I don't like having them in the dev container folder since they're not used just for dev containers. These Dockeriles will define the way we run the application.

On the GCS we use the Go standard of putting them in build/package. Unfortunately that won't work since build is taken by cmake. Maybe we can compromise on a docker folder.

Yeah, perhaps just put them in a docker directory. So we will have docker/Dockerfile, docker/Dockerfile.arm, and docker/Dockerfile.jetson, or something along those lines.

Also do we want the x86 one to just be Dockerfile or should we make it Dockerfile.x86 so it matches the other ones

@atar13
Copy link
Member Author

atar13 commented Nov 3, 2023

Thank you for researching this change.

But I disagree. This is going to pollute the root with 3 Dockerfiles (x86, arm, Jetson). I think we should keep all files in this folder.

I agree that we shouldn't pollute the root. However I don't like having them in the dev container folder since they're not used just for dev containers. These Dockeriles will define the way we run the application.

On the GCS we use the Go standard of putting them in build/package. Unfortunately that won't work since build is taken by cmake. Maybe we can compromise on a docker folder.

Yeah, perhaps just put them in a docker directory. So we will have docker/Dockerfile, docker/Dockerfile.arm, and docker/Dockerfile.jetson, or something along those lines.

Also do we want the x86 one to just be Dockerfile or should we make it Dockerfile.x86 so it matches the other ones

I like Dockerfile.x86 to be consistent. We cannot assume that such a proprietary architecture will be the default.

Since we are planning on having architecture specific Dockerfiles (for
ARM, x86 and Jetson ARM + CUDA), it makes sense to give each Dockerfile
an extension that indicates its architecture.

The Dockerfiles will also be placed in a docker folder to avoid
polluting the root directory.
@atar13 atar13 requested a review from Samir-Rashid November 3, 2023 16:57
Copy link
Contributor

@Tyler-Lentz Tyler-Lentz left a comment

Choose a reason for hiding this comment

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

forgor 💀 to update devcontainer.json to add new filepath

initially was going to have as a cmake custom target, however the host
system might not have cmake setup or built the cmake files.

now, only make and docker are needed to build and run the containers
Copy link
Contributor

Choose a reason for hiding this comment

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

should be put into cmake

@atar13 atar13 changed the title move Dockerfile to root of the project separate x86, ARM, Jetson Dockerfiles Nov 11, 2023
@Samir-Rashid
Copy link
Contributor

Thank you for researching this change. But I disagree. This is going to pollute the root with 3 Dockerfiles (x86, arm, Jetson). I think we should keep all files in this folder. We will also want to add a .env files with variables for all the URLs are using to be shared among the Dockerfiles.

Can we revive this PR? The changes look good. Only thing I would recommend is my above comment. I think I have changed my mind, 3 Dockerfiles is fine for now and we can deduplicate code when we get more clarity about the differences. (Make issue for this before merge)

@atar13
Copy link
Member Author

atar13 commented Nov 17, 2023

This is next on my todolist once after I get torchvision sorted out since that's blocking people's work.

Issue is over here: #42

@atar13 atar13 marked this pull request as draft December 1, 2023 02:49
@atar13
Copy link
Member Author

atar13 commented Feb 26, 2024

Moving work over to #119 since this branch got stale and is missing a lot of recent changes.

@atar13 atar13 closed this Feb 26, 2024
@Tyler-Lentz Tyler-Lentz deleted the chore/move-dockerfile branch June 12, 2024 02:56
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.

3 participants