Spaces:
Running
Running
File size: 811 Bytes
2345077 b75deba 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 23 24 25 26 27 28 29 30 31 32 | # 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
RUN apt-get update && apt-get install -y \
git \
tesseract-ocr \
tesseract-ocr-eng \
libtesseract-dev \
&& 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"] |