FROM python:3.10-slim # Install minimal operational dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ && rm -rf /var/lib/apt/lists/* # Set up the strict Hugging Face unprivileged user space RUN useradd -m -u 1000 user WORKDIR /home/user/app # Download and install wireproxy binary safely RUN curl -L "https://github.com" | tar xz -C /usr/local/bin/ \ && chmod +x /usr/local/bin/wireproxy # Pull over repository items and apply permissions matching UID 1000 COPY --chown=user . . USER user # Install Python proxy-supporting networking libraries RUN pip install --no-cache-dir requests[socks] gradio EXPOSE 7860 # Custom bash wrapper to execute both wireproxy and python parallelly CMD wireproxy -c wireproxy.conf & python3 app.py