| # MutVar v2 β HuggingFace Spaces Dockerfile | |
| # Runs nginx (port 7860) + uvicorn (localhost:8000) via supervisord. | |
| # Data is read at query time from HuggingFace Datasets via DuckDB httpfs. | |
| # No bulk data in the image β fast build, small image. | |
| FROM python:3.12-slim | |
| # Install nginx + supervisor | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| nginx \ | |
| supervisor \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Python dependencies | |
| COPY backend/requirements.txt ./backend/requirements.txt | |
| RUN pip install --no-cache-dir -r backend/requirements.txt | |
| # Pre-install DuckDB httpfs extension (avoids runtime download) | |
| RUN python -c "import duckdb; con = duckdb.connect(); con.execute('INSTALL httpfs'); con.close()" | |
| # Application code (no data/ directory needed) | |
| COPY backend/ ./backend/ | |
| # Frontend assets | |
| COPY landing.html /usr/share/nginx/html/landing.html | |
| COPY index.html /usr/share/nginx/html/index.html | |
| COPY landscape.html /usr/share/nginx/html/landscape.html | |
| COPY vcf-upload.html /usr/share/nginx/html/vcf-upload.html | |
| COPY kinaseatlas.html /usr/share/nginx/html/kinaseatlas.html | |
| COPY structures/ /usr/share/nginx/html/structures/ | |
| # nginx + supervisord config | |
| COPY nginx.conf /etc/nginx/conf.d/default.conf | |
| COPY supervisord.conf /etc/supervisor/conf.d/mutvar.conf | |
| RUN rm -f /etc/nginx/sites-enabled/default \ | |
| && chmod -R 644 /usr/share/nginx/html/structures/ \ | |
| && chmod 755 /usr/share/nginx/html/structures/ | |
| # ββ Data source ββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Set HF_DATASET to your HuggingFace dataset repo ID. | |
| # The backend reads Parquet files from there at query time. | |
| # For private datasets, also set HF_TOKEN. | |
| ENV HF_DATASET=edohollou/mutvar-variants | |
| EXPOSE 7860 | |
| CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/mutvar.conf"] | |