Spaces:
Running
Running
dboa9 Cursor commited on
Commit ·
9992ca6
1
Parent(s): c5230e3
Fix: Add dev mode required packages (git, wget, bash, git-lfs)
Browse files- Install all HF Spaces dev mode requirements
- Use WORKDIR /app (required for dev mode)
- Add .dockerignore to exclude unnecessary files
Co-authored-by: Cursor <cursoragent@cursor.com>
- .dockerignore +14 -0
- Dockerfile +16 -12
.dockerignore
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.git
|
| 2 |
+
.gitignore
|
| 3 |
+
.dockerignore
|
| 4 |
+
*.md
|
| 5 |
+
*.code-workspace
|
| 6 |
+
shared/
|
| 7 |
+
__pycache__/
|
| 8 |
+
*.pyc
|
| 9 |
+
run_remote.py.txt
|
| 10 |
+
sync_projects.sh
|
| 11 |
+
test_jira_login.py
|
| 12 |
+
trigger_cloud.py
|
| 13 |
+
EVIDENCE_FILE_VERIFICATION_REPORT.md
|
| 14 |
+
MoltbotEngine.code-workspace
|
Dockerfile
CHANGED
|
@@ -1,35 +1,37 @@
|
|
| 1 |
# Moltbot Hybrid Engine - Multi-service Dockerfile
|
| 2 |
# Runs: FastAPI (port 7860) + Ollama (port 11434, background)
|
| 3 |
-
# Build: 2026-02-06
|
| 4 |
-
#
|
| 5 |
|
| 6 |
FROM python:3.11-slim
|
| 7 |
|
| 8 |
-
# Install
|
| 9 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
| 10 |
curl \
|
|
|
|
| 11 |
procps \
|
|
|
|
|
|
|
| 12 |
&& apt-get clean \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
-
#
|
| 16 |
RUN useradd -m -u 1000 user
|
| 17 |
|
| 18 |
-
# Switch to
|
| 19 |
USER user
|
| 20 |
-
|
| 21 |
-
# Set home to the user's home directory
|
| 22 |
ENV HOME=/home/user \
|
| 23 |
PATH=/home/user/.local/bin:$PATH
|
| 24 |
|
| 25 |
-
# Set
|
| 26 |
-
WORKDIR
|
| 27 |
|
| 28 |
-
#
|
| 29 |
RUN pip install --no-cache-dir --upgrade pip
|
| 30 |
|
| 31 |
-
# Copy
|
| 32 |
-
COPY --chown=user .
|
| 33 |
|
| 34 |
# Install Python dependencies
|
| 35 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
@@ -37,6 +39,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 37 |
# Make start script executable
|
| 38 |
RUN chmod +x start.sh
|
| 39 |
|
|
|
|
| 40 |
EXPOSE 7860
|
| 41 |
|
|
|
|
| 42 |
CMD ["./start.sh"]
|
|
|
|
| 1 |
# Moltbot Hybrid Engine - Multi-service Dockerfile
|
| 2 |
# Runs: FastAPI (port 7860) + Ollama (port 11434, background)
|
| 3 |
+
# Build: 2026-02-06 v4.0
|
| 4 |
+
# Dev Mode compatible per HF docs
|
| 5 |
|
| 6 |
FROM python:3.11-slim
|
| 7 |
|
| 8 |
+
# Install ALL packages required for HF Spaces Dev Mode + our needs
|
| 9 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 10 |
+
bash \
|
| 11 |
curl \
|
| 12 |
+
wget \
|
| 13 |
procps \
|
| 14 |
+
git \
|
| 15 |
+
git-lfs \
|
| 16 |
&& apt-get clean \
|
| 17 |
&& rm -rf /var/lib/apt/lists/*
|
| 18 |
|
| 19 |
+
# Create HF-required user (uid 1000)
|
| 20 |
RUN useradd -m -u 1000 user
|
| 21 |
|
| 22 |
+
# Switch to user
|
| 23 |
USER user
|
|
|
|
|
|
|
| 24 |
ENV HOME=/home/user \
|
| 25 |
PATH=/home/user/.local/bin:$PATH
|
| 26 |
|
| 27 |
+
# Set working directory to /app (required for dev mode)
|
| 28 |
+
WORKDIR /app
|
| 29 |
|
| 30 |
+
# Upgrade pip
|
| 31 |
RUN pip install --no-cache-dir --upgrade pip
|
| 32 |
|
| 33 |
+
# Copy all files with correct ownership
|
| 34 |
+
COPY --chown=user . /app
|
| 35 |
|
| 36 |
# Install Python dependencies
|
| 37 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 39 |
# Make start script executable
|
| 40 |
RUN chmod +x start.sh
|
| 41 |
|
| 42 |
+
# Expose HF Spaces port
|
| 43 |
EXPOSE 7860
|
| 44 |
|
| 45 |
+
# CMD required (not ENTRYPOINT) for dev mode compatibility
|
| 46 |
CMD ["./start.sh"]
|