Refactor MCP server and enhance development environment
This commit refactors the MCP server implementation, updates the Dockerfile with new development tools and dependencies, introduces a Makefile for building and running the application, and adds utility modules for sandbox management and Ollama integration. The server name has also been updated from 'echo-server' to 'PMO-Crazy-coder' in the configuration.
This commit is contained in:
51
Dockerfile
51
Dockerfile
@@ -1,16 +1,61 @@
|
||||
# Dockerfile
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Ajouter le dépôt Debian Testing pour les paquets plus récents
|
||||
RUN echo "deb http://deb.debian.org/debian testing main" \
|
||||
> /etc/apt/sources.list.d/testing.list
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Installer les outils de développement Go et Rust
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
clang \
|
||||
llvm-dev \
|
||||
libclang-dev \
|
||||
pkg-config \
|
||||
build-essential \
|
||||
git \
|
||||
make \
|
||||
curl \
|
||||
nodejs \
|
||||
npm \
|
||||
pylint \
|
||||
black \
|
||||
flake8 \
|
||||
mypy \
|
||||
isort
|
||||
|
||||
COPY tools tools
|
||||
|
||||
# Installer la dernière version de Go
|
||||
RUN bash tools/install_latest_go.sh
|
||||
ENV PATH=/usr/local/go/bin:$PATH
|
||||
|
||||
# Installer la dernière version de Rust
|
||||
ENV RUSTUP_HOME=/usr/local/rustup
|
||||
ENV CARGO_HOME=/usr/local/cargo
|
||||
ENV PATH=/usr/local/cargo/bin:$PATH
|
||||
RUN curl https://sh.rustup.rs -sSf \
|
||||
| sh -s -- -y --default-toolchain stable \
|
||||
&& rustup install nightly \
|
||||
&& rustup component add rustfmt clippy rust-src rust-docs \
|
||||
&& cargo install cargo-edit cargo-watch cargo-outdated cargo-make cargo-binstall
|
||||
|
||||
# Installer la dernière version de typscript
|
||||
RUN npm install -g typescript tsc @types/node eslint prettier
|
||||
|
||||
RUN cargo binstall --strategies crate-meta-data jj-cli
|
||||
|
||||
# Installer le SDK MCP Python
|
||||
RUN pip install --no-cache-dir fastmcp
|
||||
RUN pip install --no-cache-dir ruff fastmcp ipython
|
||||
|
||||
# Copier le serveur
|
||||
COPY src/* .
|
||||
COPY src .
|
||||
|
||||
# Exposer le port
|
||||
EXPOSE 6666
|
||||
ENV OLLAMA_ADDR="http://host.docker.internal:11434"
|
||||
|
||||
# Lancer le serveur
|
||||
CMD ["python", "./mon_mcp.py"]
|
||||
CMD ["python", "./PMOCrazyCoder.py"]
|
||||
|
||||
Reference in New Issue
Block a user