| |
| |
| |
|
|
| FROM python:3.12-slim AS base |
|
|
| ENV PYTHONDONTWRITEBYTECODE=1 \ |
| PYTHONUNBUFFERED=1 \ |
| PIP_DISABLE_PIP_VERSION_CHECK=1 \ |
| PIP_NO_CACHE_DIR=1 \ |
| DEPLOY_ENV=hf_spaces |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| build-essential \ |
| libgomp1 \ |
| libxrender1 \ |
| libsm6 \ |
| libxext6 \ |
| supervisor \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /app |
|
|
| |
| COPY requirements.txt ./ |
| RUN pip install -r requirements.txt |
|
|
| |
| COPY src/ ./src/ |
| COPY tests/fixtures/ ./tests/fixtures/ |
| COPY supervisord.conf ./supervisord.conf |
|
|
| |
| |
| |
| |
| RUN mkdir -p data/raw data/processed && \ |
| cp tests/fixtures/bbbp_sample.csv data/raw/bbbp.csv && \ |
| cp tests/fixtures/eeg_sample.fif data/raw/eeg.fif && \ |
| python -m src.pipelines.bbb_pipeline && \ |
| python -m src.models.bbb_model && \ |
| 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'))" && \ |
| 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'))" |
|
|
| |
| |
| |
| |
| |
| COPY tests/fixtures/kb_sample/ ./data/knowledge_base/seed/ |
| RUN python -m src.rag.ingest data/knowledge_base data/processed/faiss_index |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD ["supervisord", "-n", "-c", "/app/supervisord.conf"] |
|
|