-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Dev Container for VS Code Python Extension #21435
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
Changes from 2 commits
ed438a1
ea4ebe7
5e4ed4b
4144b44
89d8aad
ed77a47
7b50445
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,29 @@ | ||||||
# This image will serve as a starting point for devcontainer.json. | ||||||
# Get fedora 37 as the base image. | ||||||
FROM docker.io/library/fedora:37 | ||||||
|
||||||
# Install supported python versions and nodejs. | ||||||
RUN dnf -y --nodocs install /usr/bin/{python3.7,python3.8,python3.9,python3.10,python3.11,git} nodejs gcc conda && \ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why gcc? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the installation of Node when you're doing that below via nvm? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The gcc is here because on the shell script that runs after creation of the docker container, I am installing requirements for users of the dev container to be able to run our tests, and for "build/smoke-test-requirements.txt", specifically, throws " No such file or directory: 'gcc' " if I do not include/download gcc on the docker file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point! I've thought nvm only took take of managing and usage of specific version of node and npm, but realized nvm not only take cares of the controlling of the version, but also the installation itself. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specifically the the build for psutil (seems to be a Python library that has to do with system utils and processes), more specifically "build/temp.linux-aarch64-cpython-37/psutil" is failing with " is failing with the message "ERROR: Failed building wheel for psutil" and "command 'gcc' failed: No such file or directory: 'gcc'" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is unique to your machine, since https://pypi.org/project/psutil/#files has wheel files for x64 and i686 for Linux, just not ARM. But specifically, which dependency is pulling it in? Looking at https://github.com/microsoft/vscode-python/blob/main/build/smoke-test-requirements.txt there is no direct dependency on it. I also don't know why any of that is being installed since we have no kernel support, so I suspect the entire file can be dropped since we don't ship Jupyter in-box anymore and the middleware issue I believe has been fixed. @karthiknadig do we still need these installed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Partially. We still have the old installer that installs pandas, jupyter etc. But, I don't think it requires these installed for testing. I don't see direct references to these packages in our test code. We might want to verify this by removing each package in the list, and running the tests to confirm. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
After testing out installing smoke-test build requirement on both Codespaces directly, and via VS Code dev container extension, I found that the gcc is only needed to be installed for ARM host(?) machine. I found this quite weird, because I would assume the platform is Fedora linux as I am accessing the dev container through the VS Code dev container extension.. the build for smoke-test-requirement is SUCCESSFUL when accessed via Codespaces, but fails when the dev container is accessed via VS Code dev container extension on my ARM machine. Should I leave the gcc installation included? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When you say running the "tests", do you mean only the smoke test, or all the other tests too, including like unit tests and functional tests? |
||||||
source ~/.bashrc && \ | ||||||
anthonykim1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
dnf clean all | ||||||
|
||||||
|
||||||
|
||||||
# ENV version for node version, nvm version, npm version | ||||||
anthonykim1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
ENV NVM_VERSION=0.39.3 | ||||||
ENV NODE_VERSION=16.17.1 | ||||||
ENV NPM_VERSION=8.19.3 | ||||||
|
||||||
# Install nvm, load nvm, and load nvm bash_completion | ||||||
anthonykim1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash | ||||||
RUN export NVM_DIR="$HOME/.nvm" && \ | ||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && \ | ||||||
nvm install $NODE_VERSION && \ | ||||||
npm install -g npm@$NPM_VERSION | ||||||
|
||||||
# For clean open source builds | ||||||
ENV DISABLE_TRANSLATIONS=true | ||||||
|
||||||
|
||||||
|
Uh oh!
There was an error while loading. Please reload this page.