Spaces:
Runtime error
Runtime error
File size: 755 Bytes
e0c9b96 c4bae31 e0c9b96 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt ./requirements.txt
RUN apt-get update \
&& apt-get -y install libpq-dev gcc \
&& pip install psycopg2
# Install uvicorn
RUN pip install uvicorn
# Use an official PostgreSQL image
FROM postgres:16
# Set environment variables
ENV POSTGRES_DB ai
ENV POSTGRES_USER ai
ENV POSTGRES_PASSWORD ai
# Mount a volume for storing data
VOLUME pgvolume
# Expose port 5532
EXPOSE 5532
# Run the container in detached mode
CMD ["docker", "run", "-d", "--name", "pgvector", "phidata/pgvector:16"]
RUN pip install ollama
RUN ollama pull nomic-embed-text
# Install dependencies
RUN pip install -r requirements.txt
COPY . /app
ENTRYPOINT ["uvicorn", "main:app"]
CMD ["--host", "0.0.0.0", "--port", "7860"] |