-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.backend
More file actions
46 lines (35 loc) · 1.06 KB
/
Dockerfile.backend
File metadata and controls
46 lines (35 loc) · 1.06 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
# Multi-stage build for Python AI backend
FROM python:3.10-slim as base
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Create app directory
WORKDIR /app
# Copy Python requirements first (for better caching)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --upgrade pip && \
pip install -r requirements.txt
# Copy your Python scripts
COPY train.py .
COPY fine_tune.py .
COPY ChatAI.py .
COPY buildapp.py .
COPY lumina_desktop.py .
# Copy any additional Python files
COPY *.py ./
# Create necessary directories
RUN mkdir -p models data logs
# Expose port for ChatAI.py Flask server
EXPOSE 5001
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:5001/health || exit 1
# Default command - lumina_desktop.py is probably your main server
CMD ["python", "lumina_desktop.py"]