Skip to content

Commit cad0e79

Browse files
author
Sovereign Map Test Suite
committed
uploaded
1 parent c93f1ba commit cad0e79

2 files changed

Lines changed: 10 additions & 126 deletions

File tree

Dockerfile

Lines changed: 10 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,33 @@
11
# Mohawk Inference Engine GUI - Production Docker Image
22
# Version: 2.1.0
3-
# Cross-platform: Windows, Linux, macOS
43

5-
FROM python:3.11-slim-bookworm
4+
FROM python:3.14-slim
65

7-
# Set environment variables for production
8-
ENV PYTHONDONTWRITEBYTECODE=1 \
9-
PYTHONUNBUFFERED=1 \
10-
PIP_NO_CACHE_DIR=1 \
11-
PIP_DISABLE_PIP_VERSION_CHECK=1 \
12-
DEBIAN_FRONTEND=noninteractive
6+
# Set environment variables
7+
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 PIP_DISABLE_PIP_VERSION_CHECK=1
138

149
# Set working directory
1510
WORKDIR /app
1611

1712
# Install system dependencies
18-
RUN apt-get update && apt-get install -y --no-install-recommends \
19-
# System libraries for PyQt6
20-
libgl1-mesa-glx \
21-
libxkbcommon-x11-0 \
22-
libdbus-1-3 \
23-
libegl1-mesa \
24-
# Build tools
25-
gcc \
26-
git \
27-
&& rm -rf /var/lib/apt/lists/*
13+
RUN apt-get update && apt-get install -y gcc git libgl1-mesa-glx libglib2.0-0 libxkbcommon-x11-0 libdbus-1-3 && rm -rf /var/lib/apt/lists/*
2814

29-
# Install Python dependencies
15+
# Copy requirements first for better caching
3016
COPY requirements.txt .
3117
RUN pip install --no-cache-dir -r requirements.txt
3218

3319
# Copy application code
3420
COPY mohawk_gui/ ./mohawk_gui/
3521

36-
# Create non-root user for security (production best practice)
37-
RUN groupadd mohawk && \
38-
useradd -r -g mohawk mohawk && \
39-
chown -R mohawk:mohawk /app
22+
# Create non-root user for security
23+
RUN groupadd mohawk && useradd -r -g mohawk mohawk
4024
USER mohawk
4125

42-
# Create directories for runtime data
43-
RUN mkdir -p /app/certs /app/logs /app/models && \
44-
chown -R mohawk:mohawk /app/certs /app/logs /app/models
45-
46-
# Copy configuration template
47-
COPY mohawk_gui/config.toml ./config.toml
48-
4926
# Expose ports
5027
EXPOSE 8003 8443
5128

5229
# Health check
53-
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
54-
CMD python -c "import sys; sys.exit(0)" || exit 1
55-
56-
# Default command - can be overridden at runtime
57-
CMD ["python", "mohawk_gui/main.py", "--host", "0.0.0.0", "--port", "8003"]
30+
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0 if __import__('mohawk_gui').main else 1)" || exit 1
5831

59-
# =============================================================================
60-
# Multi-stage build for smaller image (optional)
61-
# =============================================================================
62-
# FROM debian:bookworm-slim AS base
63-
# RUN apt-get update && apt-get install -y \
64-
# python3.11 \
65-
# python3-pip \
66-
# libgl1-mesa-glx \
67-
# libxkbcommon-x11-0 \
68-
# libdbus-1-3 \
69-
# && rm -rf /var/lib/apt/lists/*
70-
#
71-
# WORKDIR /app
72-
# COPY --from=python:3.11-slim-bookworm /usr/local/lib/python3.11/site-packages/ /usr/local/lib/python3.11/site-packages/
32+
# Default command
33+
CMD ["python", "mohawk_gui/main.py"]

build_windows.bat

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +0,0 @@
1-
@echo off
2-
REM =============================================================================
3-
REM Mohawk Inference Engine GUI - Windows Build Script
4-
REM Version: 2.1.0 - Production Ready
5-
REM =============================================================================
6-
7-
echo ════════════════════════════════════════════════════════════
8-
echo MOHAWK INFERENCE ENGINE GUI - Windows Build System v2.1.0
9-
echo ════════════════════════════════════════════════════════════
10-
echo.
11-
12-
REM Check Python version
13-
python --version
14-
echo.
15-
16-
REM Check if virtual environment exists, create if not
17-
if not exist "venv" (
18-
echo Creating virtual environment...
19-
python -m venv venv
20-
)
21-
22-
REM Activate virtual environment
23-
call venv\Scripts\activate.bat
24-
25-
REM Install dependencies
26-
echo Installing dependencies...
27-
pip install --upgrade pip
28-
pip install -r requirements.txt
29-
echo.
30-
31-
REM Build executable with PyInstaller
32-
echo Building standalone executable...
33-
pyinstaller \
34-
--name=Mohawk-Inference-Engine \
35-
--onefile \
36-
--windowed \
37-
--add-data=mohawk_gui\resources;resources \
38-
--hidden-import=mohawk_gui.main \
39-
--hidden-import=mohawk_gui.auth_manager \
40-
--hidden-import=mohawk_gui.connection_pool \
41-
--hidden-import=mohawk_gui.metrics_buffer \
42-
--hidden-import=mohawk_gui.error_recovery \
43-
--hidden-import=mohawk_gui.monitoring \
44-
--hidden-import=mohawk_gui.audit_logger \
45-
mohawk_gui\main.py
46-
47-
echo.
48-
echo ════════════════════════════════════════════════════════════
49-
echo BUILD COMPLETE!
50-
echo ════════════════════════════════════════════════════════════
51-
echo.
52-
echo Executable location: dist\Mohawk*-Inference-Engine.exe
53-
echo.
54-
55-
REM Show dist directory contents
56-
echo Dist directory contents:
57-
dir /b dist\*.exe 2>nul || echo No executable found
58-
59-
echo.
60-
echo ════════════════════════════════════════════════════════════
61-
echo NEXT STEPS:
62-
echo ════════════════════════════════════════════════════════════
63-
echo.
64-
echo 1. Copy the executable to your deployment location
65-
echo Example: copy dist\Mohawk*-Inference-Engine.exe C:\Program Files\Mohawk\
66-
echo.
67-
echo 2. Run the executable (first run will generate auth key)
68-
echo Mohawk-Inference-Engine.exe --host localhost --port 8003
69-
echo.
70-
echo 3. For production, configure SSL certificates in certs/ directory
71-
echo.
72-
echo 4. Use docker-compose.yml for containerized deployment
73-
echo.
74-
echo ════════════════════════════════════════════════════════════
75-
echo.
76-
77-
pause

0 commit comments

Comments
 (0)