Files
Stanislav Hejny f13fd4153a
Unit test coverage / pytest (push) Successful in 1m21s
/ build-and-push (push) Successful in 1m45s
Unit test coverage / pytest (pull_request) Successful in 1m21s
Fix dependency versions
2025-06-20 16:17:12 +02:00

44 lines
1.1 KiB
Docker

# Use the official Python image as the base image
FROM python:3.11-slim
# Set the working directory to /app
WORKDIR /app
ENV PYTHONPATH=/app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY pyproject.toml .
RUN pip install --no-cache-dir build
RUN pip install --no-cache-dir .
# Install additional dependencies for demo.py
RUN pip install --no-cache-dir \
uvicorn[standard]==0.29.0 \
python-multipart==0.0.9 \
httpx==0.27.0 \
opentelemetry-api==1.34.1 \
opentelemetry-sdk==1.34.1 \
opentelemetry-exporter-otlp-proto-grpc==1.34.1 \
opentelemetry-exporter-prometheus==0.55b1 \
opentelemetry-instrumentation-fastapi==0.55b1 \
opentelemetry-instrumentation-httpx==0.55b1 \
protobuf==5.28.3
# Copy the application code
COPY ./amqp ./amqp
COPY ./otdemo ./otdemo
COPY ./demo.py .
# Create directory for uploaded files
RUN mkdir -p /tmp/clevermicro_documents
# Expose the port
EXPOSE 8000 8001
# Run the FastAPI application
CMD ["uvicorn", "demo:app", "--host", "0.0.0.0", "--port", "8000"]