File size: 822 Bytes
49d1f65
 
15314da
84678e4
4dcf4f5
f1cc92e
 
 
 
 
 
 
 
15314da
f1cc92e
 
 
 
 
18a44a4
c59deb3
f1cc92e
15314da
4b999cf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim

# Install git for repository cloning
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
RUN uv pip install --system git+https://github.com/MarcSkovMadsen/holoviz-mcp.git[panel-extensions] # 1

# Set up a new user named "user" with user ID 1000 (required by Hugging Face Spaces)
RUN useradd -m -u 1000 user
USER user

# Set home to the user's home directory
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH \
    HOLOVIZ_MCP_USER_DIR=/home/user/app

WORKDIR $HOME/app

COPY --chown=user config.yaml config.yaml

# Run the update commands
RUN holoviz-mcp-update

# Use the virtual environment's executables directly
CMD ["holoviz-mcp-serve", "--address", "0.0.0.0", "--port", "7860",  "--allow-websocket-origin", "*", "--num-procs", "2"]