File size: 807 Bytes
0730903
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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