CoolFace
Apppublic

smilkov/imdb

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
Dockerfile47 linesDownload Raw Back to root
1FROM python:3.11-slim-bullseye2 3# Allow statements and log messages to immediately appear in the Knative logs4ENV PYTHONUNBUFFERED True5 6# Adds GCC and other build tools so we can compile hnswlib and other native/C++ deps.7RUN apt-get update --fix-missing && apt-get install -y --fix-missing build-essential && \8  rm -rf /var/lib/apt/lists/*9 10# See: https://huggingface.co/docs/hub/spaces-sdks-docker#permissions11RUN useradd -m -u 1000 user12USER user13ENV HOME=/home/user \14  PATH=/home/user/.local/bin:$PATH15 16# Set the working directory in the container.17WORKDIR $HOME/app18 19# Install the dependencies. This will look in ./dist for any wheels that match lilac. If they are20# not found, it will use the public pip package.21 22# Pip install lilac[all] and dependencies before trying to install the local image. This allows us23# to get cache hits on dependency installations when using a local wheel. When using the public pip24# package, the second call will be a no-op.25RUN python -m pip install lilac[all]26 27# Install from the local wheel inside ./dist. This will be a no-op if the wheel is not found.28COPY --chown=user /dist ./dist/29RUN python -m pip install --find-links=dist --upgrade lilac[all]30 31# Install the huggingface hub, used to download files.32RUN pip install huggingface_hub33 34# Copy the README so we can read the datasets from the HuggingFace config.35COPY --chown=user README.md .36# Copy the license just in case.37COPY --chown=user LICENSE .38 39COPY --chown=user docker_start.sh ./40 41# Make a local data directory for non-persistent storage demos.42RUN mkdir -p ./data43RUN chown -R user ./data44 45EXPOSE 543246CMD ["bash", "docker_start.sh"]47