I have setup gradio with qdrant locally with docker with docker compose . How do i do that in hf-spaces?
FROM python:3.10-slim
COPY . .
# Install dependencies including gcc and graphviz
RUN apt-get update && \
apt-get install -y gcc graphviz graphviz-dev libgraphviz-dev
# apt-get clean && rm -rf /var/lib/apt/lists/*
# Update pip to the latest version
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
RUN pip install --upgrade pip
# Install pygraphviz with --build-option flags
# RUN pip install --no-cache-dir --build-option="--include-path=/usr/include/graphviz" --build-option="--library-path=/usr/lib/graphviz" pygraphviz
# Install other dependencies
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user . $HOME/app
WORKDIR /$HOME/app
# Expose port
EXPOSE 6333
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT="7860"
CMD [ "gradio","app.py" ]
My local docker-compose.yml
version: '3.9'
services:
app:
build: .
ports:
- "7860:7860"
volumes:
- ./:/user/src/app/data
environment:
- GRADIO_SERVER_NAME=0.0.0.0
- GRADIO_SERVER_PORT=7860
depends_on:
- qdrant
qdrant:
image: qdrant/qdrant
ports:
- "6333:6333"