BulkCalcSpace / Dockerfile
meg's picture
meg HF Staff
Update Dockerfile
ae4a830 verified
raw
history blame
653 Bytes
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04
RUN useradd -m -u 1000 user
ENV PATH=/opt/conda/bin:$PATH
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN git clone -b energy_star_dev https://github.com/huggingface/optimum-benchmark.git /optimum-benchmark && cd optimum-benchmark && pip install -e .
USER user
WORKDIR /app
# Expose the secret token at buildtime and use its value as git remote URL
RUN --mount=type=secret,id=BULK_ENERGY_TOKEN,mode=0444,required=true \
git init && \
git remote add origin $(cat /run/secrets/BULK_ENERGY_TOKEN)
COPY --chown=user . /app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]