mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-29 10:42:03 +00:00
Docker: Move to venv for running
Newer versions of Python don't allow system package installation unless --break-system-packages are specified. I'd like to avoid this if possible. Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
This commit is contained in:
@@ -8,10 +8,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
ca-certificates \
|
ca-certificates \
|
||||||
python3.12 \
|
python3.12 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
|
python3.12-venv \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Create a virtual environment
|
||||||
|
RUN python3 -m venv /opt/venv
|
||||||
|
|
||||||
|
# Activate the venv and set the PATH
|
||||||
|
ENV PATH="/opt/venv/bin:$PATH"
|
||||||
|
|
||||||
# Upgrade pip
|
# Upgrade pip
|
||||||
RUN pip3 install --no-cache-dir --upgrade pip
|
RUN pip install --no-cache-dir --upgrade pip
|
||||||
|
|
||||||
# Set the working directory in the container
|
# Set the working directory in the container
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -20,7 +27,7 @@ WORKDIR /app
|
|||||||
COPY pyproject.toml .
|
COPY pyproject.toml .
|
||||||
|
|
||||||
# Install packages specified in pyproject.toml cu121, extras
|
# Install packages specified in pyproject.toml cu121, extras
|
||||||
RUN pip3 install --no-cache-dir .[cu121,extras]
|
RUN pip install --no-cache-dir .[cu121,extras]
|
||||||
|
|
||||||
RUN rm pyproject.toml
|
RUN rm pyproject.toml
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user