Spaces:
Sleeping
Sleeping
File size: 1,171 Bytes
5c3badd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | FROM node:18-slim
# Install Python3, pip
RUN apt-get update && apt-get install -y python3 python3-pip && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip3 install --no-cache-dir --break-system-packages -r requirements.txt
# Global install Claude Code CLI
RUN npm install -g @anthropic-ai/claude-code
# Copy web app files only (solver files are fetched from GitHub at runtime)
COPY app.py solver.py /app/
COPY static/ /app/static/
# Create workspaces directory
RUN mkdir -p /app/workspaces
# Create non-root user (claude CLI refuses to run as root)
RUN useradd -m -s /bin/bash solver
RUN mkdir -p /home/solver/.claude
COPY settings.json /home/solver/.claude/settings.json
RUN chown -R solver:solver /home/solver/.claude
RUN chown -R solver:solver /app
EXPOSE 7860
USER solver
ENV HOME=/home/solver
ENV PATH="/usr/local/lib/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ENV PYTHONUNBUFFERED=1
# Default: fetch solver files from this GitHub repo at startup
ENV SOLVER_REPO_URL="https://github.com/Usami-Mira/CC_Integrater/raw/refs/heads/main/"
CMD ["python3", "/app/app.py"]
|