File size: 637 Bytes
2345077
 
 
 
 
 
 
 
 
 
 
fcf36e3
2345077
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 1. Base Image
FROM python:3.11-slim

# 2. Install Git
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# 3. FETCH PRIVATE CODE
# This mounts your HF_TOKEN secret just long enough to clone your private vault
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
    git clone https://user:$(cat /run/secrets/HF_TOKEN)@huggingface.co/spaces/RayNene/SemaLabsVault .

# 4. INSTALL & RUN
RUN pip install --no-cache-dir -r requirements.txt

# Force Gradio/Flask to use the correct port for HF
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT=7860
EXPOSE 7860

CMD ["python", "app.py"]