feat: add dockerfile
Browse files- Dockerfile +30 -0
- scripts/docker-deploy.sh +17 -0
Dockerfile
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM fedora:43
|
| 2 |
+
|
| 3 |
+
EXPOSE 7860
|
| 4 |
+
|
| 5 |
+
RUN dnf install python3.13 uv git-core -y
|
| 6 |
+
|
| 7 |
+
RUN useradd -m -u 1000 user
|
| 8 |
+
RUN mkdir -p /app && chown -R user:user /app
|
| 9 |
+
|
| 10 |
+
RUN git clone --depth 1 https://github.com/NeuroML/neuroml-ai.git /app
|
| 11 |
+
RUN chown -R user:user /app
|
| 12 |
+
|
| 13 |
+
WORKDIR /app
|
| 14 |
+
USER user
|
| 15 |
+
|
| 16 |
+
RUN uv venv /app/nml-ai-venv
|
| 17 |
+
ENV VIRTUAL_ENV=/app/nml-ai-venv
|
| 18 |
+
ENV PATH="/app/nml-ai-venv/bin:$PATH"
|
| 19 |
+
|
| 20 |
+
RUN uv pip install .
|
| 21 |
+
|
| 22 |
+
# in huggingface folder
|
| 23 |
+
COPY --chown=user scripts/* /app/scripts/
|
| 24 |
+
RUN chmod +x scripts/docker-deploy.sh
|
| 25 |
+
|
| 26 |
+
ENV NML_AI_CHAT_MODEL="huggingface:Qwen/Qwen3-30B-A3B-Instruct-2507:cheapest"
|
| 27 |
+
ENV NML_AI_EMBEDDING_MODEL="huggingface:BAAI/bge-m3:cheapest"
|
| 28 |
+
ENV RUNNING_IN_DOCKER=1
|
| 29 |
+
|
| 30 |
+
CMD ["./scripts/docker-deploy.sh"]
|
scripts/docker-deploy.sh
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Copyright 2025 Ankur Sinha
|
| 4 |
+
# Author: Ankur Sinha <sanjay DOT ankur AT gmail DOT com>
|
| 5 |
+
# File: docker/deploy.sh
|
| 6 |
+
#
|
| 7 |
+
# Script for docker deployments
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
echo "Re-starting MCP server"
|
| 11 |
+
nml-mcp &
|
| 12 |
+
|
| 13 |
+
echo "Starting fastapi"
|
| 14 |
+
fastapi dev neuroml_ai/api/main.py --port 8005 &
|
| 15 |
+
|
| 16 |
+
echo "Starting streamlit frontend"
|
| 17 |
+
streamlit run neuroml_ai/streamlit_ui.py --server.port=7860 --server.address=0.0.0.0
|