Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +27 -9
Dockerfile
CHANGED
|
@@ -1,9 +1,27 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
COPY
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.9-slim
|
| 2 |
+
|
| 3 |
+
# Set the working directory
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
|
| 6 |
+
# Copy the required files
|
| 7 |
+
COPY requirements.txt .
|
| 8 |
+
COPY app.py .
|
| 9 |
+
|
| 10 |
+
# Install Python dependencies
|
| 11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
+
|
| 13 |
+
# Expose the port for the Chainlit application
|
| 14 |
+
EXPOSE 7860
|
| 15 |
+
|
| 16 |
+
# Install and start ChromaDB
|
| 17 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 18 |
+
ca-certificates \
|
| 19 |
+
curl \
|
| 20 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
+
|
| 22 |
+
RUN curl -Lo /tmp/chroma.tgz https://dl.ntcd.nl/chromadb/chroma-latest.tgz \
|
| 23 |
+
&& tar -xzf /tmp/chroma.tgz -C /tmp \
|
| 24 |
+
&& mv /tmp/chroma /app/chroma
|
| 25 |
+
|
| 26 |
+
# Start ChromaDB and Chainlit
|
| 27 |
+
CMD ["sh", "-c", "/app/chroma/chroma -i :8000 & chainlit run app.py --port 7860"]
|