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 FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04
# Set non-interactive for apt
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC
SHELL ["/bin/bash", "-c"]
# 1. Install System Dependencies # ============================================================
RUN apt-get update && apt-get install -y \ # System dependencies
wget \ # ============================================================
curl \ RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \ wget curl ca-certificates gnupg \
python3-pip \ python3 python3-pip python3-venv \
python3-venv \ git build-essential gfortran \
git \ zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev \
build-essential \ xvfb libgl1-mesa-glx libglfw3 \
zlib1g-dev \ libxrandr2 libxinerama1 libxcursor1 libxi6 \
libpng-dev \ libssl-dev libcurl4-openssl-dev libxml2-dev \
libjpeg-dev \
libfreetype6-dev \
xvfb \
libgl1-mesa-glx \
libgl1-mesa-dri \
libglfw3 \
libxrandr2 \
libxinerama1 \
libxcursor1 \
libxi6 \
&& rm -rf /var/lib/apt/lists/* && 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 WORKDIR /app
COPY . .
# 4. Integrate JuliaMSI Framework # ============================================================
COPY JuliaMSI /opt/JuliaMSI # Julia environment
WORKDIR /opt/JuliaMSI # ============================================================
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 ENV DISPLAY=:99
# Instantiate framework package LABEL maintainer="MSI Julia-Python CNN"
RUN xvfb-run -s "-screen 0 1024x768x24" julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.precompile()' LABEL description="Julia preprocessing + Python SimCLR - MSI CNN Pipeline (GPU)"
# 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"] CMD ["/bin/bash"]