ORBITT / Dockerfile
aniketkumar1106's picture
Upload 4 files
9182674 verified
raw
history blame contribute delete
907 Bytes
# 1. Base Image
FROM python:3.11-slim
# 2. Install Git LFS to handle the 10GB download
RUN apt-get update && apt-get install -y git git-lfs && git lfs install
# 3. Setup Hugging Face User
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# 4. Install Dependencies
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 5. DOWNLOAD YOUR DATA (The 10GB Part)
# We use the HF_TOKEN secret to clone your private dataset into the /app folder.
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
git clone https://user:$(cat /run/secrets/hf_token)@huggingface.co/datasets/aniketkumar1106/orbit-data .
# 6. EXPOSE PORT & RUN
# Hugging Face Spaces mandates port 7860.
# We override the port here so you don't have to change your server.py.
EXPOSE 7860
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]