Spaces:
Paused
Paused
Adarsh Kumar commited on
Update Dockerfile
Browse files12345678910111213141516# Dockerfile.clone — Exact clone these inception files to space and run directlyFROM python:3.11-slimWORKDIR /appRUN apt-get update && apt-get install -y --no-install-recommends git curl build-essential && rm -rf /var/lib/apt/lists/*# Clone current repo exactly — branch arena/01a0b57f-serv or mainRUN git clone https://github.com/Adarshukumar/serv__.git /tmp/serv__ && \ls -la /tmp/serv__/inception/ && \cp -r /tmp/serv__/inception/* /app/ && \rm -rf /tmp/serv__ && \ls -la /app/RUN pip install --no-cache-dir -r /app/requirements.txtEXPOSE 7860ENV PYTHONUNBUFFERED=1ENV PORT=7860ENV PYTHONPATH=/appCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers", "--forwarded-allow-ips=*"]12345678910111213141516171819202122232425262728293031323334# ONE DOCKERFILE — Clone this branch that folder to run using it — As soon as you put Dockerfile it starts working# This Dockerfile clones branch arena/01a0b57f-serv inception folder exactly and runs it# For Hugging Face Spaces: Put this single Dockerfile in your Space repo root, push, it will start workingFROM python:3.11-slimWORKDIR /app# Install git (needed to clone)RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*# Clone this branch that folder exactly# Branch: arena/01a0b57f-serv# Repo: Adarshukumar/serv__# Folder: inception/RUN git clone --branch arena/01a0b57f-serv https://github.com/Adarshukumar/serv__.git /tmp/repo || \git clone https://github.com/Adarshukumar/serv__.git /tmp/repo && \cp -r /tmp/repo/inception/* /app/ && \rm -rf /tmp/repo && \ls -la /app/# Install deps from inception folderRUN pip install --no-cache-dir --upgrade pip && \pip install --no-cache-dir -r /app/requirements.txt# Hugging Face Spaces expects 7860EXPOSE 7860ENV PYTHONUNBUFFERED=1ENV PORT=7860ENV PYTHONPATH=/app# As soon as you put Dockerfile it starts working — runs inception with user IP forwarding, session on entryCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers", "--forwarded-allow-ips=*"]
Dockerfile+26-8