69 lines
1.9 KiB
Docker
69 lines
1.9 KiB
Docker
# Use NVIDIA CUDA as the base for GPU support
|
|
FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04
|
|
|
|
# Set non-interactive for apt
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# 1. Install System Dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
wget \
|
|
curl \
|
|
python3 \
|
|
python3-pip \
|
|
python3-venv \
|
|
git \
|
|
build-essential \
|
|
zlib1g-dev \
|
|
libpng-dev \
|
|
libjpeg-dev \
|
|
libfreetype6-dev \
|
|
xvfb \
|
|
libgl1-mesa-glx \
|
|
libgl1-mesa-dri \
|
|
libglfw3 \
|
|
libxrandr2 \
|
|
libxinerama1 \
|
|
libxcursor1 \
|
|
libxi6 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# 2. Install Julia 1.11.3
|
|
RUN curl -fsSL https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.3-linux-x86_64.tar.gz | tar -xz -C /usr/local --strip-components=1
|
|
|
|
# 3. Setup Working Directory
|
|
WORKDIR /app
|
|
|
|
# 4. Integrate JuliaMSI Framework
|
|
COPY JuliaMSI /opt/JuliaMSI
|
|
WORKDIR /opt/JuliaMSI
|
|
|
|
ENV DISPLAY=:99
|
|
|
|
# Instantiate framework package
|
|
RUN xvfb-run -s "-screen 0 1024x768x24" julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.precompile()'
|
|
|
|
# 5. Setup Project Root and Environments
|
|
WORKDIR /app
|
|
COPY environment/ /app/environment/
|
|
|
|
# Isolate Python dependencies for cleaner caching layers
|
|
RUN pip3 install --no-cache-dir -r environment/requirements.txt
|
|
|
|
# Force Julia 1.11.3 to resolve environments natively using your fixed UUID entries
|
|
RUN julia --project=environment -e 'using Pkg; Pkg.resolve(); Pkg.instantiate()'
|
|
|
|
# Register JuliaMSI explicitly into the runtime environment project
|
|
RUN julia --project=environment -e 'using Pkg; Pkg.develop(path="/opt/JuliaMSI")'
|
|
|
|
# 6. Copy Application Files
|
|
COPY . /app
|
|
|
|
# 7. Final Configuration
|
|
ENV JULIA_LOAD_PATH="/opt/JuliaMSI:/opt/JuliaMSI/src:${JULIA_LOAD_PATH}"
|
|
ENV PYTHONPATH="/app/scripts_python:${PYTHONPATH}"
|
|
ENV DISPLAY=:99
|
|
|
|
LABEL maintainer="MSI Hybrid Workflow Team"
|
|
LABEL description="CUDA + Julia 1.11.3 + JuliaMSI Framework"
|
|
|
|
CMD ["/bin/bash"] |