Spaces:
Running

hyperFVC / workflow /docker-compose.gpu.yml
lauransotomayor's picture
Mirror GitHub Pages presentation build (part 4)
d1ffd83 verified
Raw History Blame Contribute Delete
3.77 kB
x-fvc-common: &fvc-common
build:
context: .
dockerfile: Dockerfile
image: fvc_function:latest
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: ${GPU_COUNT:-1}
capabilities: [gpu]
ipc: host
shm_size: "32gb"
working_dir: /workspace
environment:
ENV_PYTHON: /opt/conda/bin/python
ENV_LIB_DIR: /opt/conda/lib
LD_LIBRARY_PATH: /opt/conda/lib
MPLBACKEND: Agg
PYTHONUNBUFFERED: "1"
NVIDIA_VISIBLE_DEVICES: "${NVIDIA_VISIBLE_DEVICES:-all}"
CUDA_VISIBLE_DEVICES: "${CUDA_VISIBLE_DEVICES:-0}"
MP_START_METHOD: "${MP_START_METHOD:-forkserver}"
TORCH_SHARING_STRATEGY: "${TORCH_SHARING_STRATEGY:-file_system}"
volumes:
- .:/workspace
- ${HOST_DATA_ROOT:-/data/fvc_function}:${CONTAINER_DATA_ROOT:-/media/laura/8402326D023263F8}
services:
fvc-dev:
<<: *fvc-common
container_name: fvc-function-container
command: bash -lc "sleep infinity"
fvc-validate:
<<: *fvc-common
environment:
ENV_PYTHON: /opt/conda/bin/python
ENV_LIB_DIR: /opt/conda/lib
LD_LIBRARY_PATH: /opt/conda/lib
MPLBACKEND: Agg
PYTHONUNBUFFERED: "1"
NVIDIA_VISIBLE_DEVICES: "${NVIDIA_VISIBLE_DEVICES:-all}"
CUDA_VISIBLE_DEVICES: "${CUDA_VISIBLE_DEVICES:-0}"
MP_START_METHOD: "${MP_START_METHOD:-forkserver}"
TORCH_SHARING_STRATEGY: "${TORCH_SHARING_STRATEGY:-file_system}"
SENSOR_PROFILE: "${SENSOR_PROFILE:-fx10_fx17_215_trim_aug_spec_transformer_weights_s152}"
IMAGE_FOLDER_OVERRIDE: "${IMAGE_FOLDER_OVERRIDE:-${CONTAINER_DATA_ROOT:-/media/laura/8402326D023263F8}/predictors/hyspec/FX10_FX17_215_trim_envi_152_crop304_ov76}"
MASK_FOLDER_OVERRIDE: "${MASK_FOLDER_OVERRIDE:-${CONTAINER_DATA_ROOT:-/media/laura/8402326D023263F8}/masks/hyspec/raw/fvc_class/downsample_10cm_mode_fx10_fx17_215_trim_from_5cm_152_crop304_ov76}"
CHECKPOINT_DIR_OVERRIDE: "${CHECKPOINT_DIR_OVERRIDE:-${CONTAINER_DATA_ROOT:-/media/laura/8402326D023263F8}/checkpoints/validate_fx10_fx17_215_trim_s152}"
command: python phase_3_models/unet_site_models/validate_setup.py
fvc-sensor-sweep:
<<: *fvc-common
profiles: ["train"]
environment:
ENV_PYTHON: /opt/conda/bin/python
ENV_LIB_DIR: /opt/conda/lib
LD_LIBRARY_PATH: /opt/conda/lib
MPLBACKEND: Agg
PYTHONUNBUFFERED: "1"
NVIDIA_VISIBLE_DEVICES: "${NVIDIA_VISIBLE_DEVICES:-all}"
CUDA_VISIBLE_DEVICES: "${CUDA_VISIBLE_DEVICES:-0}"
MP_START_METHOD: "${MP_START_METHOD:-forkserver}"
TORCH_SHARING_STRATEGY: "${TORCH_SHARING_STRATEGY:-file_system}"
START_AT: "${START_AT:-fx10_s224}"
RUN_HYSPEC_PREWEIGHTS: "${RUN_HYSPEC_PREWEIGHTS:-0}"
PRECHECK_ONLY: "${PRECHECK_ONLY:-0}"
command: bash -lc "bash scripts/run_sensor_profiles_in_order.sh"
fvc-train:
build:
context: .
dockerfile: Dockerfile
image: fvc_function:latest
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: ${GPU_COUNT:-1}
capabilities: [gpu]
ipc: host
shm_size: "16gb"
working_dir: /workspace
environment:
ENV_PYTHON: /opt/conda/bin/python
ENV_LIB_DIR: /opt/conda/lib
LD_LIBRARY_PATH: /opt/conda/lib
NVIDIA_VISIBLE_DEVICES: "${NVIDIA_VISIBLE_DEVICES:-all}"
CUDA_VISIBLE_DEVICES: "${CUDA_VISIBLE_DEVICES:-0}"
SENSOR_PROFILE: mica
SPECTRAL_EXPERIMENT_MODE: no_spectral
USE_AUGMENTED_DATA: "0"
MICA_AUG_REUSE_MICA_SUBSAMPLE: "1"
volumes:
- .:/workspace
- ${HOST_DATA_ROOT:-/data/fvc_function}:${CONTAINER_DATA_ROOT:-/media/laura/8402326D023263F8}
command: python phase_3_models/unet_site_models/validate_setup.py