Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +13 -0
Dockerfile
CHANGED
|
@@ -1,14 +1,27 @@
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
RUN useradd -m -u 1000 user && python -m pip install --upgrade pip
|
| 4 |
USER user
|
| 5 |
ENV PATH="/home/user/.local/bin:$PATH"
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
|
|
|
|
|
|
|
|
|
| 9 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 10 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 11 |
|
|
|
|
|
|
|
|
|
|
| 12 |
COPY --chown=user . /app
|
| 13 |
ENV MCP_TRANSPORT=http
|
| 14 |
ENV MCP_PORT=7860
|
|
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
| 3 |
+
# Install build dependencies for Cython
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
build-essential \
|
| 6 |
+
gcc \
|
| 7 |
+
g++ \
|
| 8 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
RUN useradd -m -u 1000 user && python -m pip install --upgrade pip
|
| 11 |
USER user
|
| 12 |
ENV PATH="/home/user/.local/bin:$PATH"
|
| 13 |
|
| 14 |
WORKDIR /app
|
| 15 |
|
| 16 |
+
# Install Cython and numpy first (required for gmatch4py compilation)
|
| 17 |
+
RUN pip install --no-cache-dir Cython numpy
|
| 18 |
+
|
| 19 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 20 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 21 |
|
| 22 |
+
# Install gmatch4py from GitHub
|
| 23 |
+
RUN pip install --no-cache-dir git+https://github.com/jacquesfize/GMatch4py.git
|
| 24 |
+
|
| 25 |
COPY --chown=user . /app
|
| 26 |
ENV MCP_TRANSPORT=http
|
| 27 |
ENV MCP_PORT=7860
|