Removed poetry files, is now git based to pull from one repo
Browse files- Dockerfile +24 -7
- poetry.lock +0 -0
- pyproject.toml +0 -34
Dockerfile
CHANGED
@@ -7,23 +7,30 @@ RUN useradd -m -u 1000 user
|
|
7 |
USER user
|
8 |
|
9 |
# Clone aerospace-chatbot github repository
|
|
|
|
|
10 |
RUN apt-get update && \
|
11 |
apt-get install -y git
|
12 |
-
RUN git clone -b rag_study https://github.com/dan-s-mueller/aerospace_chatbot.git
|
13 |
|
14 |
# Set home to the user's home directory
|
|
|
15 |
ENV HOME=/home/user \
|
16 |
PATH=/home/user/.local/bin:$PATH
|
17 |
WORKDIR $HOME
|
18 |
|
19 |
# Create directories for the app code to be copied into
|
20 |
-
RUN mkdir -p $HOME/src
|
|
|
|
|
21 |
|
22 |
# Install Poetry
|
23 |
RUN pip3 install poetry==1.7.1
|
24 |
|
25 |
# Copy poetry files
|
26 |
-
|
|
|
|
|
27 |
|
28 |
# Disable virtual environments creation by Poetry
|
29 |
# as the Docker container itself is an isolated environment
|
@@ -39,9 +46,11 @@ ENV PATH="$HOME/.venv/bin:$PATH"
|
|
39 |
RUN poetry install --no-dev
|
40 |
|
41 |
# Copy the rest of your application code
|
42 |
-
COPY --chown=user
|
43 |
-
COPY --chown=user
|
44 |
-
COPY --chown=user
|
|
|
|
|
45 |
|
46 |
# Expose the port Streamlit runs on
|
47 |
EXPOSE 8501
|
@@ -49,11 +58,19 @@ EXPOSE 8501
|
|
49 |
# The HEALTHCHECK instruction tells Docker how to test a container to check that it is still working. Your container needs to listen to Streamlit’s (default) port 8501:
|
50 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
51 |
|
|
|
|
|
52 |
# Update working directory to be consistent with where Start.py is
|
53 |
WORKDIR $HOME/src
|
54 |
|
55 |
# An ENTRYPOINT allows you to configure a container that will run as an executable. Here, it also contains the entire streamlit run command for your app, so you don’t have to call it from the command line
|
56 |
-
ENTRYPOINT ["streamlit", "run", "
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
# To run remotely
|
59 |
# docker run -it -p 7860:7860 --platform=linux/amd64 \
|
|
|
7 |
USER user
|
8 |
|
9 |
# Clone aerospace-chatbot github repository
|
10 |
+
USER root
|
11 |
+
WORKDIR /app
|
12 |
RUN apt-get update && \
|
13 |
apt-get install -y git
|
14 |
+
RUN git clone -b rag_study https://github.com/dan-s-mueller/aerospace_chatbot.git .
|
15 |
|
16 |
# Set home to the user's home directory
|
17 |
+
USER user
|
18 |
ENV HOME=/home/user \
|
19 |
PATH=/home/user/.local/bin:$PATH
|
20 |
WORKDIR $HOME
|
21 |
|
22 |
# Create directories for the app code to be copied into
|
23 |
+
RUN mkdir -p $HOME/src
|
24 |
+
RUN mkdir -p $HOME/data
|
25 |
+
RUN mkdir -p $HOME/config
|
26 |
|
27 |
# Install Poetry
|
28 |
RUN pip3 install poetry==1.7.1
|
29 |
|
30 |
# Copy poetry files
|
31 |
+
RUN cp /app/pyproject.toml /app/poetry.lock* $HOME
|
32 |
+
RUN chown user:user $HOME/pyproject.toml $HOME/poetry.lock*
|
33 |
+
# COPY --chown=user /app/pyproject.toml /app/poetry.lock* $HOME
|
34 |
|
35 |
# Disable virtual environments creation by Poetry
|
36 |
# as the Docker container itself is an isolated environment
|
|
|
46 |
RUN poetry install --no-dev
|
47 |
|
48 |
# Copy the rest of your application code
|
49 |
+
# COPY --chown=user src $HOME/src
|
50 |
+
# COPY --chown=user data $HOME/data
|
51 |
+
# COPY --chown=user config $HOME/config
|
52 |
+
RUN cp -R /app/src /app/data /app/config $HOME
|
53 |
+
RUN chown -R user:user $HOME/src $HOME/data $HOME/config
|
54 |
|
55 |
# Expose the port Streamlit runs on
|
56 |
EXPOSE 8501
|
|
|
58 |
# The HEALTHCHECK instruction tells Docker how to test a container to check that it is still working. Your container needs to listen to Streamlit’s (default) port 8501:
|
59 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
60 |
|
61 |
+
# COPY --chown=user app.py $HOME/src
|
62 |
+
|
63 |
# Update working directory to be consistent with where Start.py is
|
64 |
WORKDIR $HOME/src
|
65 |
|
66 |
# An ENTRYPOINT allows you to configure a container that will run as an executable. Here, it also contains the entire streamlit run command for your app, so you don’t have to call it from the command line
|
67 |
+
ENTRYPOINT ["streamlit", "run", "Home.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
68 |
+
|
69 |
+
# CMD ["python", "app.py"]
|
70 |
+
|
71 |
+
# To run locally
|
72 |
+
# docker build -t ams-chatbot .
|
73 |
+
# docker run -p 8501:8501 ams-chatbot
|
74 |
|
75 |
# To run remotely
|
76 |
# docker run -it -p 7860:7860 --platform=linux/amd64 \
|
poetry.lock
DELETED
The diff for this file is too large to render.
See raw diff
|
|
pyproject.toml
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
[tool.poetry]
|
2 |
-
name = "aerospace-chatbot"
|
3 |
-
version = "0.1.0"
|
4 |
-
description = ""
|
5 |
-
authors = ["dsmueller <[email protected]>"]
|
6 |
-
|
7 |
-
[tool.poetry.dependencies]
|
8 |
-
python = ">=3.11,<3.13"
|
9 |
-
python-dotenv = "^1.0.0"
|
10 |
-
ipykernel = "^6.28.0"
|
11 |
-
ipywidgets = "^8.1.1"
|
12 |
-
langchainhub = "^0.1.14"
|
13 |
-
tiktoken = "^0.5.2"
|
14 |
-
watchdog = "^3.0.0"
|
15 |
-
chromadb = "^0.4.22"
|
16 |
-
jsonlines = "^4.0.0"
|
17 |
-
pypdf = "^3.17.4"
|
18 |
-
streamlit = "^1.29.0"
|
19 |
-
langchain-community = "^0.0.10"
|
20 |
-
langchain = "^0.1.0"
|
21 |
-
tenacity = "^8.2.3"
|
22 |
-
openai = "^1.7.2"
|
23 |
-
langchain-openai = "^0.0.2.post1"
|
24 |
-
sentence-transformers = "^2.2.2"
|
25 |
-
ragatouille = "^0.0.4b2"
|
26 |
-
nbformat = "^5.9.2"
|
27 |
-
pydantic = "^2.6.0"
|
28 |
-
RAGxplorer = { git = "https://github.com/dan-s-mueller/RAGxplorer.git", branch = "load_options" }
|
29 |
-
pinecone-client = "^3.0.2"
|
30 |
-
|
31 |
-
|
32 |
-
[build-system]
|
33 |
-
requires = ["poetry-core"]
|
34 |
-
build-backend = "poetry.core.masonry.api"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|