terminal-agent / Dockerfile
josephrw's picture
Upload folder using huggingface_hub
d562640 verified
Raw
History Blame Contribute Delete
1.02 kB
# Membra Terminal Agent — Hugging Face Spaces
# Serves the full Flask web terminal on port 7860
FROM python:3.11-slim
WORKDIR /app
# Install system deps: build tools, Node, and Solana CLI.
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential python3-dev curl git nodejs npm libsodium-dev bzip2 \
&& npm install -g vercel netlify-cli \
&& sh -c "$(curl -sSfL https://release.solana.com/stable/install)" \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="/root/.local/share/solana/install/active_release/bin:${PATH}"
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application
COPY app.py .
COPY templates/ templates/
COPY static/ static/
# Create required directories
RUN mkdir -p logs
# Create default config
RUN echo '{"tasks": {}}' > config.json
RUN echo '{}' > agent_state.json
# HF Spaces expects port 7860
EXPOSE 7860
ENV PORT=7860
ENV PYTHONUNBUFFERED=1
CMD ["python3", "app.py"]