File size: 1,288 Bytes
644bdfe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d2951fc
 
d0882e6
d2951fc
 
4523553
d2951fc
644bdfe
 
9b88aa8
 
 
 
d2951fc
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM python:3.10-slim

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    gcc \
    python3-dev \
    openssl \
    curl \
    ca-certificates \
    gnupg \
    build-essential && \
    rm -rf /var/lib/apt/lists/*

# Set up MariaDB's Python connector dependencies
RUN curl -LsSO https://r.mariadb.com/downloads/mariadb_repo_setup && \
    echo "c4a0f3dade02c51a6a28ca3609a13d7a0f8910cccbb90935a2f218454d3a914a  mariadb_repo_setup" | sha256sum -c - && \
    chmod +x mariadb_repo_setup && \
    ./mariadb_repo_setup --mariadb-server-version="mariadb-11.7" && \
    rm mariadb_repo_setup && \
    apt-get update && \
    apt-get install -y --no-install-recommends \
    libmariadb3 \
    libmariadb-dev && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Copy requirements first for better cache usage
COPY requirements.txt /app/

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of your code
COPY . /app

# Hugging Face Spaces expects your app to listen on $PORT
EXPOSE 7860
ENV PORT=7860

# Run your app (update this to your actual entrypoint if needed)
CMD ["python", "-m", "mcp-server-mariadb-vector", "--transport", "sse", "--host", "0.0.0.0", "--port", "7860"]