Spaces:
Sleeping
Sleeping
Download Dockerfile from davanstrien/qdrant_test: direct link, hf CLI and curl.
- Browser
- Download file 956 Bytes
-
https://huggingface.co/spaces/davanstrien/qdrant_test/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/davanstrien/qdrant_test/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/davanstrien/qdrant_test/resolve/main/Dockerfile
956 Bytes
| # Use the official Qdrant image as a base | |
| FROM qdrant/qdrant:latest | |
| # Set environment variables | |
| ENV QDRANT_CONFIG_PATH=/qdrant/config/production.yaml | |
| # Create necessary directories and set permissions | |
| USER root | |
| RUN mkdir -p /data/storage /data/snapshots && \ | |
| chown -R 1000:1000 /data | |
| # Copy the custom config file | |
| COPY config.yaml /qdrant/config/production.yaml | |
| # Mount the secret and set it as an environment variable | |
| RUN --mount=type=secret,id=QDRANT_API_KEY,mode=0444,required=true \ | |
| export QDRANT__SERVICE__API_KEY=$(cat /run/secrets/QDRANT_API_KEY) && \ | |
| echo "export QDRANT__SERVICE__API_KEY=$QDRANT__SERVICE__API_KEY" > /qdrant/api_key.sh && \ | |
| chmod +x /qdrant/api_key.sh | |
| # Switch back to the non-root user | |
| USER 1000 | |
| # Expose the necessary ports | |
| EXPOSE 6333 | |
| # Set the working directory | |
| WORKDIR /qdrant | |
| # Modify the entrypoint to source the API key | |
| ENTRYPOINT ["/bin/bash", "-c", "source /qdrant/api_key.sh && ./entrypoint.sh"] |