From fc3683a1612a8e74700259da5f3688a0e6b551bf Mon Sep 17 00:00:00 2001 From: Joy Liu Date: Sat, 4 Nov 2023 23:42:06 -0400 Subject: [PATCH] hm --- backend/Dockerfile | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 8109f3b..fe157c6 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,19 +8,15 @@ ENV LANG C.UTF-8 WORKDIR /app/ # Install dependencies for Python 3.10 -RUN apt-get update \ - && apt-get install --no-install-recommends -y gnupg2 wget build-essential ca-certificates curl tar make zlib1g-dev libssl-dev libpcre3-dev \ +RUN apt-get update && apt-get install --no-install-recommends -y gnupg2 wget build-essential ca-certificates curl tar make zlib1g-dev libssl-dev libpcre3-dev \ && rm -rf /var/lib/apt/lists/* - - -# Install Python 3.10 from the official Python repository -RUN curl -O https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz && \ - tar -xzvf Python-3.10.0.tgz && \ - cd Python-3.10.0 && \ - make -j "$(nproc)" && \ - make install && \ - cd .. && \ - rm -rf Python-3.10.0* +RUN curl https://pyenv.run | bash +RUN git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv +RUN echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc && \ + echo 'eval "$(pyenv init -)"' >> ~/.bashrc && \ + echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc +RUN pyenv install 3.10.0 +RUN pyenv global 3.10.0 # Install dependencies RUN apt-get update \