Skip to content

Commit

Permalink
Fixing dev containers regarding Python version (#2697)
Browse files Browse the repository at this point in the history
***NO_CI***
  • Loading branch information
Ellerbach authored Jul 17, 2023
1 parent 9b4d8e9 commit 33477b4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
16 changes: 11 additions & 5 deletions .devcontainer/sources/Dockerfile.All
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxcontainers/debian-slim:latest AS downloader
FROM ubuntu:latest AS downloader
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils \
&& apt-get install -y \
Expand Down Expand Up @@ -28,7 +28,7 @@ RUN wget $CMAKE_SCRIPT \
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
&& rm /tmp/cmake-install.sh

FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer
FROM ubuntu:latest AS devcontainer

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -50,11 +50,16 @@ RUN apt-get update \
curl \
ninja-build \
srecord \
python3 \
python3-pip \
nodejs \
libffi-dev

# Set Python 10 as the default version
RUN apt-get install -y software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update \
&& apt-get install -y python3.10 \
python3-pip

# Create needed directories
RUN mkdir -p /usr/local/bin/gcc \
&& mkdir -p /usr/local/bin/titools
Expand Down Expand Up @@ -118,7 +123,8 @@ RUN ln -fs /usr/bin/python3 /usr/bin/python \
# Install ESP-IDF
ENV IDF_PATH=/sources/esp-idf
ENV ESP_PATCH_VER=esp-2021r2-patch5-8.4.0
RUN python -m pip install -r $IDF_PATH/requirements.txt
# This is now taking care in the following line
# RUN python -m pip install -r $IDF_PATH/requirements.txt
RUN $IDF_PATH/install.sh

ENV PATH=$PATH:\
Expand Down
16 changes: 11 additions & 5 deletions .devcontainer/sources/Dockerfile.ESP32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxcontainers/debian-slim:latest AS downloader
FROM ubuntu:latest AS downloader
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils \
&& apt-get install -y \
Expand All @@ -17,7 +17,7 @@ RUN wget $CMAKE_SCRIPT \
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
&& rm /tmp/cmake-install.sh

FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer
FROM ubuntu:latest AS devcontainer

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -37,11 +37,16 @@ RUN apt-get update \
curl \
ninja-build \
srecord \
python3 \
python3-pip \
nodejs \
libffi-dev

# Set Python 10 as the default version
RUN apt-get install -y software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update \
&& apt-get install -y python3.10 \
python3-pip

# Create needed directories
RUN mkdir -p /usr/local/bin/gcc

Expand All @@ -63,7 +68,8 @@ ENV PATH=/usr/bin/cmake/bin:${PATH}
# Install ESP-IDF
ENV IDF_PATH=/sources/esp-idf
ENV ESP_PATCH_VER=esp-2021r2-patch5-8.4.0
RUN python -m pip install -r $IDF_PATH/requirements.txt
# This is now taking care in the following line
# RUN python -m pip install -r $IDF_PATH/requirements.txt
RUN $IDF_PATH/install.sh

ENV PATH=$PATH:\
Expand Down

0 comments on commit 33477b4

Please sign in to comment.