Subir archivos a "/"

This commit is contained in:
2026-08-27 22:08:02 +02:00
parent 2d48668aae
commit dbf92edadc
+40 -55
View File
@@ -1,69 +1,54 @@
# 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
ENV TZ=UTC
SHELL ["/bin/bash", "-c"]
# 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 \
# ============================================================
# System dependencies
# ============================================================
RUN apt-get update && apt-get install -y --no-install-recommends \
wget curl ca-certificates gnupg \
python3 python3-pip python3-venv \
git build-essential gfortran \
zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev \
xvfb libgl1-mesa-glx libglfw3 \
libxrandr2 libxinerama1 libxcursor1 libxi6 \
libssl-dev libcurl4-openssl-dev libxml2-dev \
&& 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
# ============================================================
# Julia 1.12 (pins the Manifest.jl julia_version = "1.12.6")
# ============================================================
RUN curl -fsSL https://julialang-s3.julialang.org/bin/linux/x64/1.12/julia-1.12.6-linux-x86_64.tar.gz \
| tar -xz -C /usr/local --strip-components=1
# 3. Setup Working Directory
# ============================================================
# Python ML packages (GPU / CUDA 12.4)
# ============================================================
RUN pip3 install --no-cache-dir \
torch torchvision --index-url https://download.pytorch.org/whl/cu124 \
&& pip3 install --no-cache-dir \
Pillow numpy scikit-learn matplotlib pandas scipy psutil plotly
# ============================================================
# Project code
# ============================================================
WORKDIR /app
COPY . .
# 4. Integrate JuliaMSI Framework
COPY JuliaMSI /opt/JuliaMSI
WORKDIR /opt/JuliaMSI
# ============================================================
# Julia environment
# ============================================================
RUN julia --project=/app/environment -e 'using Pkg; Pkg.resolve(); Pkg.instantiate(); Pkg.precompile()'
# ============================================================
# Environment variables
# ============================================================
ENV PYTHONPATH="/app/scripts/python:${PYTHONPATH}"
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"
LABEL maintainer="MSI Julia-Python CNN"
LABEL description="Julia preprocessing + Python SimCLR - MSI CNN Pipeline (GPU)"
CMD ["/bin/bash"]