fix(deploy): seed EEG fixture, run all pipelines at build, drop MLflow kill-switch
Browse filesThe Experiments tab was permanently empty and the BBB provenance strip
showed dashes because NEUROBRIDGE_DISABLE_MLFLOW=1 short-circuited the
MLflow file-store lookups even though mlruns/ IS produced inside the
image at build time. Drop the env, run EEG + MRI pipelines too so all
three experiments have at least one run, and seed data/raw/eeg.fif
from the fixture so the Signal tab works on first click.
- Dockerfile +8 -5
- Dockerfile.hf +8 -5
Dockerfile
CHANGED
|
@@ -9,7 +9,6 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
| 9 |
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
| 10 |
PIP_NO_CACHE_DIR=1 \
|
| 11 |
DEPLOY_ENV=hf_spaces \
|
| 12 |
-
NEUROBRIDGE_DISABLE_MLFLOW=1 \
|
| 13 |
NEUROBRIDGE_DISABLE_LLM=1
|
| 14 |
|
| 15 |
# --- system deps for RDKit, nibabel, MNE ---
|
|
@@ -33,13 +32,17 @@ COPY src/ ./src/
|
|
| 33 |
COPY tests/fixtures/ ./tests/fixtures/
|
| 34 |
COPY supervisord.conf ./supervisord.conf
|
| 35 |
|
| 36 |
-
#
|
| 37 |
-
#
|
| 38 |
-
#
|
|
|
|
| 39 |
RUN mkdir -p data/raw data/processed && \
|
| 40 |
cp tests/fixtures/bbbp_sample.csv data/raw/bbbp.csv && \
|
|
|
|
| 41 |
python -m src.pipelines.bbb_pipeline && \
|
| 42 |
-
python -m src.models.bbb_model
|
|
|
|
|
|
|
| 43 |
|
| 44 |
# --- HF Spaces convention ---
|
| 45 |
EXPOSE 7860
|
|
|
|
| 9 |
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
| 10 |
PIP_NO_CACHE_DIR=1 \
|
| 11 |
DEPLOY_ENV=hf_spaces \
|
|
|
|
| 12 |
NEUROBRIDGE_DISABLE_LLM=1
|
| 13 |
|
| 14 |
# --- system deps for RDKit, nibabel, MNE ---
|
|
|
|
| 32 |
COPY tests/fixtures/ ./tests/fixtures/
|
| 33 |
COPY supervisord.conf ./supervisord.conf
|
| 34 |
|
| 35 |
+
# Seed raw data from fixtures so the deployed Signal/Image/Molecule tabs
|
| 36 |
+
# work on first click. Then run all three pipelines so mlruns/ contains
|
| 37 |
+
# one run per modality — feeds /experiments/runs and the BBB provenance
|
| 38 |
+
# strip. data/raw/* is gitignored locally so we cannot COPY it.
|
| 39 |
RUN mkdir -p data/raw data/processed && \
|
| 40 |
cp tests/fixtures/bbbp_sample.csv data/raw/bbbp.csv && \
|
| 41 |
+
cp tests/fixtures/eeg_sample.fif data/raw/eeg.fif && \
|
| 42 |
python -m src.pipelines.bbb_pipeline && \
|
| 43 |
+
python -m src.models.bbb_model && \
|
| 44 |
+
python -c "from pathlib import Path; from src.pipelines.eeg_pipeline import run_pipeline; run_pipeline(input_path=Path('tests/fixtures/eeg_sample.fif'), output_path=Path('data/processed/eeg_features.parquet'))" && \
|
| 45 |
+
python -c "from pathlib import Path; from src.pipelines.mri_pipeline import run_pipeline; run_pipeline(input_dir=Path('tests/fixtures/mri_sample'), sites_csv=Path('tests/fixtures/mri_sample/sites.csv'), output_path=Path('data/processed/mri_features.parquet'))"
|
| 46 |
|
| 47 |
# --- HF Spaces convention ---
|
| 48 |
EXPOSE 7860
|
Dockerfile.hf
CHANGED
|
@@ -9,7 +9,6 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
| 9 |
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
| 10 |
PIP_NO_CACHE_DIR=1 \
|
| 11 |
DEPLOY_ENV=hf_spaces \
|
| 12 |
-
NEUROBRIDGE_DISABLE_MLFLOW=1 \
|
| 13 |
NEUROBRIDGE_DISABLE_LLM=1
|
| 14 |
|
| 15 |
# --- system deps for RDKit, nibabel, MNE ---
|
|
@@ -33,13 +32,17 @@ COPY src/ ./src/
|
|
| 33 |
COPY tests/fixtures/ ./tests/fixtures/
|
| 34 |
COPY supervisord.conf ./supervisord.conf
|
| 35 |
|
| 36 |
-
#
|
| 37 |
-
#
|
| 38 |
-
#
|
|
|
|
| 39 |
RUN mkdir -p data/raw data/processed && \
|
| 40 |
cp tests/fixtures/bbbp_sample.csv data/raw/bbbp.csv && \
|
|
|
|
| 41 |
python -m src.pipelines.bbb_pipeline && \
|
| 42 |
-
python -m src.models.bbb_model
|
|
|
|
|
|
|
| 43 |
|
| 44 |
# --- HF Spaces convention ---
|
| 45 |
EXPOSE 7860
|
|
|
|
| 9 |
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
| 10 |
PIP_NO_CACHE_DIR=1 \
|
| 11 |
DEPLOY_ENV=hf_spaces \
|
|
|
|
| 12 |
NEUROBRIDGE_DISABLE_LLM=1
|
| 13 |
|
| 14 |
# --- system deps for RDKit, nibabel, MNE ---
|
|
|
|
| 32 |
COPY tests/fixtures/ ./tests/fixtures/
|
| 33 |
COPY supervisord.conf ./supervisord.conf
|
| 34 |
|
| 35 |
+
# Seed raw data from fixtures so the deployed Signal/Image/Molecule tabs
|
| 36 |
+
# work on first click. Then run all three pipelines so mlruns/ contains
|
| 37 |
+
# one run per modality — feeds /experiments/runs and the BBB provenance
|
| 38 |
+
# strip. data/raw/* is gitignored locally so we cannot COPY it.
|
| 39 |
RUN mkdir -p data/raw data/processed && \
|
| 40 |
cp tests/fixtures/bbbp_sample.csv data/raw/bbbp.csv && \
|
| 41 |
+
cp tests/fixtures/eeg_sample.fif data/raw/eeg.fif && \
|
| 42 |
python -m src.pipelines.bbb_pipeline && \
|
| 43 |
+
python -m src.models.bbb_model && \
|
| 44 |
+
python -c "from pathlib import Path; from src.pipelines.eeg_pipeline import run_pipeline; run_pipeline(input_path=Path('tests/fixtures/eeg_sample.fif'), output_path=Path('data/processed/eeg_features.parquet'))" && \
|
| 45 |
+
python -c "from pathlib import Path; from src.pipelines.mri_pipeline import run_pipeline; run_pipeline(input_dir=Path('tests/fixtures/mri_sample'), sites_csv=Path('tests/fixtures/mri_sample/sites.csv'), output_path=Path('data/processed/mri_features.parquet'))"
|
| 46 |
|
| 47 |
# --- HF Spaces convention ---
|
| 48 |
EXPOSE 7860
|