Spaces:
Runtime error
Runtime error
TahaRasouli
commited on
Commit
•
c4bae31
1
Parent(s):
8ffbe92
Update Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
CHANGED
@@ -6,6 +6,26 @@ RUN apt-get update \
|
|
6 |
&& pip install psycopg2
|
7 |
# Install uvicorn
|
8 |
RUN pip install uvicorn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
# Install dependencies
|
10 |
RUN pip install -r requirements.txt
|
11 |
COPY . /app
|
|
|
6 |
&& pip install psycopg2
|
7 |
# Install uvicorn
|
8 |
RUN pip install uvicorn
|
9 |
+
|
10 |
+
# Use an official PostgreSQL image
|
11 |
+
FROM postgres:16
|
12 |
+
|
13 |
+
# Set environment variables
|
14 |
+
ENV POSTGRES_DB ai
|
15 |
+
ENV POSTGRES_USER ai
|
16 |
+
ENV POSTGRES_PASSWORD ai
|
17 |
+
|
18 |
+
# Mount a volume for storing data
|
19 |
+
VOLUME pgvolume
|
20 |
+
|
21 |
+
# Expose port 5532
|
22 |
+
EXPOSE 5532
|
23 |
+
|
24 |
+
# Run the container in detached mode
|
25 |
+
CMD ["docker", "run", "-d", "--name", "pgvector", "phidata/pgvector:16"]
|
26 |
+
|
27 |
+
RUN pip install ollama
|
28 |
+
RUN ollama pull nomic-embed-text
|
29 |
# Install dependencies
|
30 |
RUN pip install -r requirements.txt
|
31 |
COPY . /app
|