Skip to content

Commit

Permalink
fix: update libraries and python for the base image (#570)
Browse files Browse the repository at this point in the history
* fix: update libraries and python for the base image

* fix:update python to python3

* fix: removing the python installation and using what's already installed

* fix: resolve error around the use of apt instead of apt-get
  • Loading branch information
iennae committed Aug 22, 2024
1 parent 8be59fc commit 21d4d6b
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions .kokoro/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
FROM gcr.io/cloud-devrel-kokoro-resources/python-base:latest

# Install libraries needed by third-party python packages that we depend on.
RUN apt update \
&& apt install -y \
RUN apt-get update \
&& apt-get install -y \
graphviz \
libcurl4-openssl-dev \
libffi-dev \
Expand All @@ -30,32 +30,19 @@ RUN apt update \
libxml2-dev \
libxslt1-dev \
openssl \
portaudio19-dev \
python-pyaudio \
zlib1g-dev \
&& apt clean
&& apt-get clean

###################### Install python 3.7.12

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

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

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

###################### Check python version

RUN python --version
RUN which python
RUN python3 --version
RUN which python3

# Setup Cloud SDK
ENV CLOUD_SDK_VERSION 369.0.0
ENV CLOUD_SDK_VERSION 489.0.0
# Use system python for cloud sdk.
ENV CLOUDSDK_PYTHON /usr/bin/python
ENV CLOUDSDK_PYTHON python3.12
RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz
RUN tar xzf google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz
RUN /google-cloud-sdk/install.sh
Expand Down

0 comments on commit 21d4d6b

Please sign in to comment.