Mdean77 commited on
Commit
ca66c69
·
1 Parent(s): 8c92d0d

Cleaned up Dockerfile and script so I can post to forum

Browse files
Files changed (3) hide show
  1. .gitignore +4 -1
  2. Dockerfile +6 -7
  3. entrypoint.sh +1 -5
.gitignore CHANGED
@@ -7,4 +7,7 @@ testing.ipynb
7
  .chainlit
8
  .files
9
  __pycache__
10
- documents
 
 
 
 
7
  .chainlit
8
  .files
9
  __pycache__
10
+ documents
11
+ Puzzlement.pages
12
+ Puzzlement.pdf
13
+
Dockerfile CHANGED
@@ -1,29 +1,29 @@
1
  # Trying to put qdrant into same container as chainlit application
2
 
 
3
  FROM qdrant/qdrant:latest
 
 
4
  RUN apt-get update && apt-get install -y \
5
  --no-install-recommends curl ca-certificates\
6
  && rm -rf /var/lib/apt/lists/*
7
 
 
8
  ADD https://astral.sh/uv/install.sh /uv-installer.sh
9
  RUN sh /uv-installer.sh && rm /uv-installer.sh
10
 
11
- # # Set te home directory and path
12
  ENV HOME=/home/user \
13
  PATH="/home/user/.local/bin:/root/.local/bin/:$PATH"
14
 
15
-
16
-
17
-
18
  # # NEEDED FOR CHAINLIT IN HUGGING FACE SPACES
19
  ENV UVICORN_WS_PROTOCOL=websockets
20
 
21
  # # Set the working directory
22
  WORKDIR $HOME/app
23
 
24
-
25
  # # Copy the app to the container
26
- COPY --chown=root . $HOME/app
27
 
28
  RUN chmod 777 entrypoint.sh
29
  # # Install the dependencies
@@ -32,4 +32,3 @@ RUN uv sync --frozen
32
  # # Expose the ports
33
  EXPOSE 7860 6333
34
  ENTRYPOINT ["./entrypoint.sh"]
35
-
 
1
  # Trying to put qdrant into same container as chainlit application
2
 
3
+ # Start with qdrant image
4
  FROM qdrant/qdrant:latest
5
+
6
+ # Need curl and ca-certificates
7
  RUN apt-get update && apt-get install -y \
8
  --no-install-recommends curl ca-certificates\
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Install uv
12
  ADD https://astral.sh/uv/install.sh /uv-installer.sh
13
  RUN sh /uv-installer.sh && rm /uv-installer.sh
14
 
15
+ # Set te home directory and path
16
  ENV HOME=/home/user \
17
  PATH="/home/user/.local/bin:/root/.local/bin/:$PATH"
18
 
 
 
 
19
  # # NEEDED FOR CHAINLIT IN HUGGING FACE SPACES
20
  ENV UVICORN_WS_PROTOCOL=websockets
21
 
22
  # # Set the working directory
23
  WORKDIR $HOME/app
24
 
 
25
  # # Copy the app to the container
26
+ COPY --chown=user . $HOME/app
27
 
28
  RUN chmod 777 entrypoint.sh
29
  # # Install the dependencies
 
32
  # # Expose the ports
33
  EXPOSE 7860 6333
34
  ENTRYPOINT ["./entrypoint.sh"]
 
entrypoint.sh CHANGED
@@ -2,12 +2,8 @@
2
  # Start Qdrant in the background
3
  echo "Starting Qdrant server..."
4
  /qdrant/qdrant &
5
- sudo mkdir -p /home/user/.local/bin
6
- echo "Qdrant is ready!"
7
 
8
- curl -LsSf https://astral.sh/uv/install.sh | sh
9
- # Start Chainlit application using Uvicorn
10
  echo "Starting Chainlit application..."
11
- echo "Current path: $PATH"
12
  uv run chainlit run app.py --host 0.0.0.0 --port 7860
13
 
 
2
  # Start Qdrant in the background
3
  echo "Starting Qdrant server..."
4
  /qdrant/qdrant &
 
 
5
 
6
+ # Run my chainlit app using uv
 
7
  echo "Starting Chainlit application..."
 
8
  uv run chainlit run app.py --host 0.0.0.0 --port 7860
9