mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
Docker setup (#34)
* Add Docker for better DX from Znack's PR * setup readme --------- Co-authored-by: znack <scher56@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2f3afd6954
commit
f8e0dd3b2a
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM python:3.10-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends gcc build-essential && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements first for better caching
|
||||
RUN pip install --no-cache-dir poetry
|
||||
|
||||
# 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 application code
|
||||
COPY . .
|
||||
|
||||
# Set Python to run in unbuffered mode (recommended for Docker)
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONPATH=/app
|
||||
|
||||
# Expose the port the app will run on
|
||||
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"]
|
||||
Reference in New Issue
Block a user