Skip to content

Commit

Permalink
Merge pull request #148 from codelion/codelion-patch-1
Browse files Browse the repository at this point in the history
Update Dockerfile
  • Loading branch information
codelion authored Jan 21, 2025
2 parents 0073975 + d36f682 commit 8b4e6fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
26 changes: 15 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ ENV OPTILLM_PORT=$PORT
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
python3-dev \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
RUN --mount=type=cache,target=/var/cache/apt \
--mount=type=cache,target=/var/lib/apt \
apt-get update && apt-get install -y --no-install-recommends \
build-essential \
python3-dev \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*

# Copy only the requirements file first to leverage Docker cache
COPY requirements.txt .
Expand All @@ -27,14 +29,16 @@ RUN pip install --no-cache-dir -r requirements.txt
FROM python:3.12-slim

# Add labels for the final image
LABEL org.opencontainers.image.source=https://github.com/codelion/optillm
LABEL org.opencontainers.image.source="https://github.com/codelion/optillm"
LABEL org.opencontainers.image.description="OptiLLM full image with model serving and API routing capabilities"
LABEL org.opencontainers.image.licenses=Apache-2.0
LABEL org.opencontainers.image.licenses="Apache-2.0"

# Install curl for the healthcheck
RUN apt-get update && apt-get install -y --no-install-recommends \
curl && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN --mount=type=cache,target=/var/cache/apt \
--mount=type=cache,target=/var/lib/apt \
apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="optillm",
version="0.0.33",
version="0.0.34",
packages=find_packages(),
py_modules=['optillm'],
package_data={
Expand Down

0 comments on commit 8b4e6fc

Please sign in to comment.