mashrur950 commited on
Commit
5d6156d
·
1 Parent(s): 6b7c27c

feat: Add Dockerfile and .dockerignore for FleetMind MCP Server setup

Browse files
Files changed (2) hide show
  1. .dockerignore +41 -0
  2. Dockerfile +34 -0
.dockerignore ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ *.egg-info/
8
+ dist/
9
+ build/
10
+
11
+ # Virtual environments
12
+ venv/
13
+ env/
14
+ ENV/
15
+
16
+ # IDE
17
+ .vscode/
18
+ .idea/
19
+ *.swp
20
+ *.swo
21
+
22
+ # Git
23
+ .git/
24
+ .gitignore
25
+
26
+ # Logs
27
+ logs/*.log
28
+
29
+ # Environment (will be set via HF Secrets)
30
+ .env
31
+
32
+ # Archive (not needed in deployment)
33
+ archive/
34
+
35
+ # Documentation
36
+ *.md
37
+ !README.md
38
+
39
+ # Test files
40
+ tests/
41
+ *.test.py
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FleetMind MCP Server - HuggingFace Space Dockerfile
2
+ # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
3
+
4
+ FROM python:3.11-slim
5
+
6
+ # Create non-root user (HuggingFace requirement)
7
+ RUN useradd -m -u 1000 user
8
+ USER user
9
+ ENV PATH="/home/user/.local/bin:$PATH"
10
+
11
+ # Set working directory
12
+ WORKDIR /app
13
+
14
+ # Copy requirements first (for better caching)
15
+ COPY --chown=user requirements.txt /app/requirements.txt
16
+
17
+ # Install dependencies
18
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
19
+
20
+ # Copy application files
21
+ COPY --chown=user . /app
22
+
23
+ # Create logs directory
24
+ RUN mkdir -p /app/logs
25
+
26
+ # Expose port 7860 (HuggingFace Space default)
27
+ EXPOSE 7860
28
+
29
+ # Health check
30
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
31
+ CMD python -c "import requests; requests.get('http://localhost:7860')" || exit 1
32
+
33
+ # Run the MCP server via app.py (SSE mode)
34
+ CMD ["python", "app.py"]