Skip to content

Commit

Permalink
Updated devcontainers to use python3.11 (#812)
Browse files Browse the repository at this point in the history
* Updated devcontainers to use python3.11

* fixed: Devcontainer uses .venv folder

---------

Co-authored-by: Bryce Meyer <[email protected]>
  • Loading branch information
jonasrohw and bryce13950 authored Dec 14, 2024
1 parent 59fd3cb commit c6b34a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# If .venv is already setup with python3.8, it will use python3.8. To use 3.11 remove it first.

# Use Nvidia Ubuntu 20 base (includes CUDA if a supported GPU is present)
# https://hub.docker.com/r/nvidia/cuda
FROM nvidia/cuda:11.6.2-cudnn8-devel-ubuntu20.04@sha256:55211df43bf393d3393559d5ab53283d4ebc3943d802b04546a24f3345825bd9
Expand All @@ -17,18 +19,26 @@ RUN groupadd --gid $USER_GID $USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

# Install dependencies
RUN sudo apt-get update && \
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \
software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \
build-essential \
python3.9 \
python3.9-dev \
python3.9-distutils \
python3.9-venv \
python3.11 \
python3.11-dev \
python3.11-distutils \
python3.11-venv \
curl \
git
git && \
# Update python3 default to point to python3.11
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2 && \
update-alternatives --set python3 /usr/bin/python3.11

# User the new user
USER $USERNAME

# Install poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
RUN curl -sSL https://install.python-poetry.org | python3.11 -
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ docs/build
.pylintrc
docs/source/generated
**.orig
.venv

0 comments on commit c6b34a0

Please sign in to comment.