File size: 574 Bytes
3e309c4 d39885a 3e309c4 e9bff89 16109f0 f528762 e9bff89 afa146e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile
FROM python:3.11
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
RUN --mount=type=secret,id=HOPSWORKS_API_KEY,mode=0444,required=true \
export HOPSWORKS_API_KEY=$(cat /run/secrets/HOPSWORKS_API_KEY)
CMD ["gunicorn", "app:app", "-b", "0.0.0.0:7860"]
|