forked from phoenix/litellm-mirror
use wheels
This commit is contained in:
parent
c99466bc25
commit
dc1904ea1e
1 changed files with 4 additions and 11 deletions
15
Dockerfile
15
Dockerfile
|
@ -18,14 +18,9 @@ RUN apt-get update && \
|
||||||
# Copy the current directory contents into the container at /app
|
# Copy the current directory contents into the container at /app
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|
||||||
# Make a virtualenv that we can copy across multistage builds
|
|
||||||
ENV VIRTUAL_ENV=/venv
|
|
||||||
RUN python -m venv $VIRTUAL_ENV
|
|
||||||
# "Activate" the virtualenv
|
|
||||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
||||||
|
|
||||||
# Install any needed packages specified in requirements.txt
|
# Install any needed packages specified in requirements.txt
|
||||||
RUN pip install --no-cache-dir -r /app/requirements.txt
|
RUN pip install wheel && \
|
||||||
|
pip wheel --no-cache-dir --wheel-dir=/app/wheels -r requirements.txt
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
FROM $LITELLM_RUNTIME_IMAGE as runtime
|
FROM $LITELLM_RUNTIME_IMAGE as runtime
|
||||||
|
@ -35,11 +30,9 @@ WORKDIR /app
|
||||||
# Copy the current directory contents into the container at /app
|
# Copy the current directory contents into the container at /app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# "Activate" the virtualenv
|
COPY --from=builder /app/wheels /app/wheels
|
||||||
ENV VIRTUAL_ENV=/venv
|
|
||||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
||||||
|
|
||||||
COPY --from=builder /venv /venv
|
RUN pip install --no-index --find-links=/app/wheels -r requirements.txt
|
||||||
|
|
||||||
EXPOSE 4000/tcp
|
EXPOSE 4000/tcp
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue