forked from MiroMindAI/MiroFlow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (45 loc) · 1.42 KB
/
Dockerfile
File metadata and controls
60 lines (45 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Multi-stage Dockerfile for MiroFlow AgentCompass Service
# This image includes the FastAPI service for MiroFlow agent framework
FROM python:3.12-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
wget \
gnupg \
ca-certificates \
curl \
git \
# For audio processing
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Create app directory
WORKDIR /app
# Upgrade pip and install build tools
RUN pip install --no-cache-dir --upgrade pip setuptools wheel uv
# Copy project files
COPY pyproject.toml /app/
COPY uv.lock /app/
# Install Python dependencies using uv for faster installation
RUN uv pip install --system --no-cache -r pyproject.toml
# Install additional dependencies required by miroflow_service_fastapi.py
RUN pip install --no-cache-dir fastapi uvicorn[standard]
# Copy the entire project
COPY . /app/
# Create .env from template if not exists
RUN if [ ! -f .env ]; then cp .env.template .env; fi
# Create necessary directories
RUN mkdir -p logs data
# Expose port
# 8082 for FastAPI service (MiroFlow default port)
EXPOSE 8082
# Copy startup script
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh
# Set environment variables
ENV PYTHONPATH=/app
ENV LOGGER_LEVEL=INFO
ENV WORKERS=10
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD curl -f http://localhost:8082/health || exit 1
# Run the startup script
CMD ["/app/start.sh"]