-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch what versions of python are supported (#5676)
Add support for testing compilation with python 3.11/3.12. Also add the dockerfiles used to build those images. --------- Co-authored-by: Michael Wyatt <[email protected]>
- Loading branch information
1 parent
3beda32
commit a1b0c35
Showing
4 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Start with NGC container | ||
FROM nvcr.io/nvidia/pytorch:24.03-py3 | ||
|
||
# Set noninteractive mode for apt-get | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install necessary dependencies for building Python | ||
RUN apt-get update && apt-get install -y \ | ||
wget \ | ||
build-essential \ | ||
libssl-dev \ | ||
zlib1g-dev \ | ||
libbz2-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
curl \ | ||
libncursesw5-dev \ | ||
libgdbm-dev \ | ||
libc6-dev \ | ||
libffi-dev \ | ||
tk-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Download and install Python 3.11 | ||
RUN wget https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tgz \ | ||
&& tar xzf Python-3.11.9.tgz \ | ||
&& cd Python-3.11.9 \ | ||
&& ./configure --enable-optimizations \ | ||
&& make altinstall \ | ||
&& cd .. \ | ||
&& rm -rf Python-3.11.9 Python-3.11.9.tgz | ||
|
||
# Set Python 3.11 as the default Python version | ||
RUN update-alternatives --install /usr/bin/python python /usr/local/bin/python3.11 1 \ | ||
&& update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.11 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Start with NGC container | ||
FROM nvcr.io/nvidia/pytorch:24.03-py3 | ||
|
||
# Set noninteractive mode for apt-get | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install necessary dependencies for building Python | ||
RUN apt-get update && apt-get install -y \ | ||
wget \ | ||
build-essential \ | ||
libssl-dev \ | ||
zlib1g-dev \ | ||
libbz2-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
curl \ | ||
libncursesw5-dev \ | ||
libgdbm-dev \ | ||
libc6-dev \ | ||
libffi-dev \ | ||
tk-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Download and install Python 3.12 | ||
RUN wget https://www.python.org/ftp/python/3.12.5/Python-3.12.5.tgz \ | ||
&& tar xzf Python-3.12.5.tgz \ | ||
&& cd Python-3.12.5 \ | ||
&& ./configure --enable-optimizations \ | ||
&& make altinstall \ | ||
&& cd .. \ | ||
&& rm -rf Python-3.12.5 Python-3.12.5.tgz | ||
|
||
# Set Python 3.12 as the default Python version | ||
RUN update-alternatives --install /usr/bin/python python /usr/local/bin/python3.12 1 \ | ||
&& update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.12 1 |
File renamed without changes.