Kaballas commited on
Commit
b34e545
·
1 Parent(s): 244ac4d
Files changed (1) hide show
  1. Dockerfile +7 -11
Dockerfile CHANGED
@@ -29,23 +29,19 @@ RUN pip install --no-cache-dir uv
29
 
30
  WORKDIR /app
31
 
32
- # Create and fix permissions for uv cache directory
33
- RUN mkdir -p /app/.cache/uv && chmod -R 777 /app/.cache/uv
34
- ENV UV_CACHE_DIR=/app/.cache/uv
35
 
36
  # Copy project files
37
  COPY . /app
38
 
39
-
40
- # Install project dependencies
41
- RUN uv sync
42
-
43
- # Clear git cache to prevent runtime issues
44
- RUN rm -rf /app/.cache/uv/git-v0 || true
45
 
46
  # Hugging Face Spaces expects your app to listen on $PORT
47
  EXPOSE 7860
48
  ENV PORT=7860
49
 
50
- # Run the app, ensuring it binds to the correct port and host, and uses the writable cache directory
51
- CMD ["sh", "-c", "uv run mcp-server-mariadb-vector --transport sse --host 0.0.0.0 --port $PORT"]
 
29
 
30
  WORKDIR /app
31
 
32
+ # Use /tmp for cache to avoid permission issues
33
+ ENV UV_CACHE_DIR=/tmp/uvcache
34
+ RUN mkdir -p ${UV_CACHE_DIR} && chmod -R 777 ${UV_CACHE_DIR}
35
 
36
  # Copy project files
37
  COPY . /app
38
 
39
+ # Install project dependencies and clean git cache
40
+ RUN uv sync && rm -rf ${UV_CACHE_DIR}/git-v0 || true
 
 
 
 
41
 
42
  # Hugging Face Spaces expects your app to listen on $PORT
43
  EXPOSE 7860
44
  ENV PORT=7860
45
 
46
+ # Run the app
47
+ CMD ["sh", "-c", "uv run mcp-server-mariadb-vector --transport sse --host 0.0.0.0 --port $PORT"]