File tree Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -69,3 +69,15 @@ python_distribution(
69
69
long_description_path = "libs/next_gen_ui_mcp/README.md" ,
70
70
generate_setup = True ,
71
71
)
72
+
73
+ docker_image (
74
+ name = "docker" ,
75
+ source = "Containerfile" ,
76
+ repository = "next_gen_ui/mcp" ,
77
+ image_tags = [env ("VERSION" ), "latest" ],
78
+ dependencies = [
79
+ ":lib" ,
80
+ ":dist" ,
81
+ "libs/next_gen_ui_agent:dist" ,
82
+ ],
83
+ )
Original file line number Diff line number Diff line change
1
+ # Next Gen UI MCP Server
2
+
3
+ # Build:
4
+ # podman run --rm -it next_gen_ui/mcp:latest
5
+
6
+ FROM registry.access.redhat.com/ubi9/python-312-minimal:9.6
7
+
8
+ # Set work directory
9
+ WORKDIR /opt/app-root/src
10
+
11
+ # Set environment variables for build
12
+ ENV PYTHONDONTWRITEBYTECODE=1 \
13
+ PYTHONUNBUFFERED=1 \
14
+ PIP_NO_CACHE_DIR=1
15
+
16
+
17
+ # Copy Python Project Files (Container context must be the `python` directory)
18
+ COPY --chown=1001:root . /opt/app-root/src/
19
+
20
+ USER root
21
+
22
+ # Install dependencies
23
+ RUN pip install *.whl \
24
+ langchain_openai
25
+
26
+ # Allow non-root user to access the everything in app-root
27
+ RUN chgrp -R root /opt/app-root/src && chmod -R g+rwx /opt/app-root/src
28
+
29
+
30
+ ENV MCP_TRANSPORT="streamable-http"
31
+ ENV MCP_HOST="0.0.0.0"
32
+ ENV MCP_PORT="5000"
33
+ ENV NGUI_COMPONENT_SYSTEM="json"
34
+ ENV NGUI_PROVIDER="langchain"
35
+ ENV NGUI_PROVIDER_API_KEY=""
36
+ ENV NGUI_MODEL="gpt-4o"
37
+ ENV NGUI_PROVIDER_LLAMA_URL=""
38
+
39
+
40
+ # Expose default port (change if needed)
41
+ EXPOSE $MCP_PORT
42
+
43
+ USER 1001
44
+
45
+ # Run the MCP
46
+ CMD python -m next_gen_ui_mcp --host "$MCP_HOST" --port "$MCP_PORT" --transport "$MCP_TRANSPORT" --component-system "$NGUI_COMPONENT_SYSTEM" \
47
+ --provider "$NGUI_PROVIDER" --model "$NGUI_MODEL" --api-key "$NGUI_PROVIDER_API_KEY" \
48
+ --llama-url "$NGUI_PROVIDER_LLAMA_URL"
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ backend_packages.add = [
8
8
" pants.backend.python.lint.flake8" ,
9
9
" pants.backend.python.lint.isort" ,
10
10
" pants.backend.python.typecheck.mypy" ,
11
+ " pants.backend.docker" ,
11
12
]
12
13
pants_ignore = [
13
14
" requirements_dev.txt"
You can’t perform that action at this time.
0 commit comments