-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Fix/devcontainer qt deps #61611
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
base: main
Are you sure you want to change the base?
Fix/devcontainer qt deps #61611
Conversation
…r-compose for M chip Mac compatibility - Added docker-compose.yml to specify platform linux/amd64 as an option - Adjusted devcontainer.json to use docker-compose setup - This fixes build issues on Apple Silicon Macs when building the dev container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Just as a heads up, I think the Docker-related files in the pandas repo are largely unmaintained and may be removed in future.
context: . | ||
dockerfile: Dockerfile | ||
# Uncomment the line below if you are using Mac with M1/M2/M3 and encounter build issues. | ||
# platform: linux/amd64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're adding docker-compose because platform cannot be specified in .devcontainer.json
, is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
yes VS Code Dev Containers does not support a plain Dockerfile to automatically detect or adjust for architecture differences. By default, it tries to build the image using the host architecture—arm64 on Apple Silicon. docker-compose.yml makes it possible to force the dev containers build with amd 64 instead
-
actually an other architecture like intel x86 user can also use this docker-compose.ym even if "platform: linux/amd64" is not uncommit. Docker will detected whether the architecture fit or not. If not, docker will build it with default suitable platform. However i dont have another pc to test so just in case i comment this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should add docker-compose.yml here; as @rhshadrach already mentioned we have very little support activity in our Docker space, so I don't think we should expand it at the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm lukewarm here; this is making the use of the container more complex (adding a file and users need to conditionally configure it). It is also not something we can reasonably ensure stays working (e.g. a build on the CI).
Looking for other's thoughts here. cc @mroeschke @WillAyd
context: . | ||
dockerfile: Dockerfile | ||
# Uncomment the line below if you are using Mac with M1/M2/M3 and encounter build issues. | ||
# platform: linux/amd64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should add docker-compose.yml here; as @rhshadrach already mentioned we have very little support activity in our Docker space, so I don't think we should expand it at the moment
@@ -6,6 +6,8 @@ RUN apt-get update && \ | |||
apt-get --no-install-recommends -y install \ | |||
build-essential \ | |||
bash-completion \ | |||
# Install Qt5 dependencies for pytest-qt, only for m chip Macs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this only affects Macs? I vaguely recall there being some kind of issue with qt on all platforms, and since this is in a Dockerfile anyway I'm not sure why the host should matter
Removed "dockerFile" setting
Added "service", "workspaceFolder", and "dockerComposeFile"
These changes resolve build failures seen on Apple Silicon when using the VS Code Remote - Containers extension.
Why this matters:
Apple Silicon machines often encounter architecture compatibility issues when building development containers, especially when Python packages need to compile C/C++ or Qt-based code. These changes ensure a smooth devcontainer build experience on both ARM64 and x86_64 environments.
Introduction
If you use mac Silicon, you should uncomment "# platform: linux/amd64" of docker-compose.yml file and #-y qt5-qmake qtbase5-dev\ of Dockerfile. If you use another plattform, just build dev container or docker container as usual, nothing was changed.