From 6dd802129f3cd7d82bce37bac0a99a115fc9489c Mon Sep 17 00:00:00 2001 From: Evil0ctal Date: Sat, 27 Apr 2024 15:44:17 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8:=20=E6=9B=B4=E6=96=B0Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6bc555f..8a890ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,9 +24,13 @@ RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ -U pip \ && pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/ \ && pip3 install virtualenv -# Create and activate virtual environment -# Using a virtual environment prevents conflicts between the app's dependencies and the system -RUN python3.11 -m virtualenv venv +# Check virtualenv is installed +RUN which virtualenv + +# Create and activate virtual environment using the virtualenv command +RUN virtualenv venv -p python3.11 + +# Set the virtual environment path ENV PATH="/app/venv/bin:$PATH" # Install dependencies in the virtual environment