ss
Browse files- Dockerfile +7 -17
Dockerfile
CHANGED
@@ -1,9 +1,5 @@
|
|
1 |
-
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
-
# Explicitly switch to root user
|
5 |
-
USER root
|
6 |
-
|
7 |
# Install system dependencies
|
8 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
9 |
gcc \
|
@@ -28,26 +24,20 @@ RUN curl -LsSO https://r.mariadb.com/downloads/mariadb_repo_setup && \
|
|
28 |
apt-get clean && \
|
29 |
rm -rf /var/lib/apt/lists/*
|
30 |
|
31 |
-
# Install uv package manager
|
32 |
-
RUN pip install --no-cache-dir uv
|
33 |
-
|
34 |
WORKDIR /app
|
35 |
|
|
|
|
|
36 |
|
37 |
-
#
|
38 |
-
|
39 |
-
RUN mkdir -p /app/.cache/uv && chmod -R 777 /app/.cache/uv
|
40 |
|
41 |
-
# Copy
|
42 |
COPY . /app
|
43 |
|
44 |
-
|
45 |
-
# Install project dependencies and clean git cache
|
46 |
-
RUN uv sync && rm -rf ${UV_CACHE_DIR}/git-v0 ${UV_CACHE_DIR}/sdists-v9 || true
|
47 |
-
|
48 |
# Hugging Face Spaces expects your app to listen on $PORT
|
49 |
EXPOSE 7860
|
50 |
ENV PORT=7860
|
51 |
|
52 |
-
#
|
53 |
-
CMD ["
|
|
|
|
|
1 |
FROM python:3.10-slim
|
2 |
|
|
|
|
|
|
|
3 |
# Install system dependencies
|
4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
5 |
gcc \
|
|
|
24 |
apt-get clean && \
|
25 |
rm -rf /var/lib/apt/lists/*
|
26 |
|
|
|
|
|
|
|
27 |
WORKDIR /app
|
28 |
|
29 |
+
# Copy requirements first for better cache usage
|
30 |
+
COPY requirements.txt /app/
|
31 |
|
32 |
+
# Install Python dependencies
|
33 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
34 |
|
35 |
+
# Copy the rest of your code
|
36 |
COPY . /app
|
37 |
|
|
|
|
|
|
|
|
|
38 |
# Hugging Face Spaces expects your app to listen on $PORT
|
39 |
EXPOSE 7860
|
40 |
ENV PORT=7860
|
41 |
|
42 |
+
# Run your app (update this to your actual entrypoint if needed)
|
43 |
+
CMD ["python", "-m", "mcp-server-mariadb-vector", "--transport", "sse", "--host", "0.0.0.0", "--port", "7860"]
|