rafaaa2105 commited on
Commit
47dc58a
·
verified ·
1 Parent(s): 1774b59

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -9
Dockerfile CHANGED
@@ -1,9 +1,27 @@
1
- FROM python:3.11
2
- RUN useradd -m -u 1000 user
3
- USER user
4
- ENV HOME=/home/user \
5
- PATH=/home/user/.local/bin:$PATH
6
- WORKDIR $HOME/app
7
- COPY --chown=user . .
8
- RUN pip install -r requirements.txt
9
- CMD ["chainlit", "run", "app.py", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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"]