mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
uv migration
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -4,17 +4,19 @@ WORKDIR /app
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends gcc build-essential && \
|
||||
apt-get install -y --no-install-recommends gcc build-essential curl && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements first for better caching
|
||||
RUN pip install --no-cache-dir poetry
|
||||
# Install uv
|
||||
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
ENV PATH="$PATH:/root/.local/bin"
|
||||
|
||||
# Install Python dependencies without creating a virtualenv
|
||||
COPY pyproject.toml poetry.lock ./
|
||||
RUN poetry config virtualenvs.create false \
|
||||
&& poetry install --without dev --no-interaction --no-ansi --no-root
|
||||
# Copy dependency files and README (needed for package build)
|
||||
COPY pyproject.toml uv.lock README.md ./
|
||||
|
||||
# Install dependencies and create virtual environment
|
||||
RUN uv sync --frozen
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
@@ -27,4 +29,4 @@ ENV PYTHONPATH=/app
|
||||
EXPOSE 8000
|
||||
|
||||
# Default to running only the API server; worker and train-api are separate Compose services
|
||||
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
CMD ["uv", "run", "uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
||||
Reference in New Issue
Block a user