FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive ENV PYTHONUNBUFFERED=1 ENV HOME=/root ENV PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # Core system packages RUN apt-get update && apt-get install -y \ python3 python3-pip python3-venv \ curl wget git nano vim \ nodejs npm \ build-essential \ openssh-client \ ca-certificates \ jq unzip zip \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Upgrade pip RUN pip3 install --upgrade pip # Python deps RUN pip3 install \ fastapi \ "uvicorn[standard]" \ httpx \ python-multipart \ aiofiles # Create all dirs and set open permissions # /data is the HF bucket mount point — must exist before mount RUN mkdir -p /data/workspace /app && \ chmod -R 777 /data && \ chmod -R 755 /app WORKDIR /app # Git global config — user overrides via CONFIG tab RUN git config --global user.email "agent@tekdev.dev" && \ git config --global user.name "TEKDEV AGENT" && \ git config --global init.defaultBranch main && \ git config --global --add safe.directory /data/workspace && \ git config --global --add safe.directory '*' && \ git config --global credential.helper store COPY app.py . COPY index.html . # Ensure files are readable RUN chmod 644 /app/app.py /app/index.html EXPOSE 7860 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]