Kaballas commited on
Commit
24fac1e
·
1 Parent(s): 4523553
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -29,10 +29,11 @@ RUN pip install --no-cache-dir uv
29
 
30
  WORKDIR /app
31
 
32
- # Ensure uv cache dir exists and is writable
33
- RUN mkdir -p /app/.cache/uv
34
  ENV UV_CACHE_DIR=/app/.cache/uv
35
 
 
36
  COPY . /app
37
 
38
  # Install project dependencies
@@ -40,8 +41,7 @@ RUN uv sync
40
 
41
  # Hugging Face Spaces expects your app to listen on $PORT
42
  EXPOSE 7860
43
-
44
- # For Spaces, use $PORT env variable (default to 7860)
45
  ENV PORT=7860
46
 
 
47
  CMD ["sh", "-c", "uv run mcp-server-mariadb-vector --transport sse --host 0.0.0.0 --port $PORT"]
 
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
  # Install project dependencies
 
41
 
42
  # Hugging Face Spaces expects your app to listen on $PORT
43
  EXPOSE 7860
 
 
44
  ENV PORT=7860
45
 
46
+ # Run the app, ensuring it binds to the correct port and host, and uses the writable cache directory
47
  CMD ["sh", "-c", "uv run mcp-server-mariadb-vector --transport sse --host 0.0.0.0 --port $PORT"]