Spaces:
Running

File size: 912 Bytes
d1ffd83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM pytorch/pytorch:2.5.1-cuda11.8-cudnn9-runtime

USER root

RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    libgl1 \
    libglib2.0-0 \
    libsm6 \
    libxext6 \
    libxrender1 \
    && rm -rf /var/lib/apt/lists/*

COPY requirements-docker.txt /tmp/requirements-docker.txt

RUN python -m pip install --no-cache-dir --upgrade pip && \
    python -m pip install --no-cache-dir -r /tmp/requirements-docker.txt

WORKDIR /workspace

COPY . /workspace

ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    MPLBACKEND=Agg \
    OMP_NUM_THREADS=4 \
    ENV_PYTHON=/opt/conda/bin/python \
    ENV_LIB_DIR=/opt/conda/lib \
    LD_LIBRARY_PATH=/opt/conda/lib

RUN python -c "import torch, pytorch_lightning, rasterio; print('Torch:', torch.__version__); print('CUDA available:', torch.cuda.is_available())"

CMD ["python", "phase_3_models/unet_site_models/validate_setup.py"]