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

chore(python): use python 3.10 for docs build #1989

Merged
merged 5 commits into from
Jul 8, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ RUN apt-get update \
libssl-dev \
libsqlite3-dev \
portaudio19-dev \
python3-distutils \
redis-server \
software-properties-common \
ssh \
Expand All @@ -60,18 +59,36 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f /var/cache/apt/archives/*.deb

###################### Install python 3.9.13

# Download python 3.9.13
RUN wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz
###################### Install python 3.9.19

# Download python 3.9.19
RUN wget https://www.python.org/ftp/python/3.9.19/Python-3.9.19.tgz

# Extract files
RUN tar -xvf Python-3.9.13.tgz
RUN tar -xvf Python-3.9.19.tgz

# Install python 3.9.13
RUN ./Python-3.9.13/configure --enable-optimizations
# Install python 3.9.19
RUN ./Python-3.9.19/configure --enable-optimizations
RUN make altinstall

###################### Install python 3.10.14 for docfx session

# Download python 3.10.14
RUN wget https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz

# Extract files
RUN tar -xvf Python-3.10.14.tgz

# Install python 3.10.14
RUN ./Python-3.10.14/configure --enable-optimizations
RUN make altinstall

###################### Use python 3.9 by default

Copy link
Contributor

Choose a reason for hiding this comment

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

rm this line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 667ffd1

RUN python3.9 -m venv /venv
ENV PATH /venv/bin:$PATH

###################### Install pip
RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
&& python3 /tmp/get-pip.py \
Expand All @@ -84,4 +101,4 @@ RUN python3 -m pip
COPY requirements.txt /requirements.txt
RUN python3 -m pip install --require-hashes -r requirements.txt

CMD ["python3.8"]
CMD ["python3.9"]