Commit
·
8060396
1
Parent(s):
8b045ff
New Updates to Dockerfile
Browse files- Dockerfile +24 -14
- README.md +2 -2
Dockerfile
CHANGED
@@ -1,25 +1,35 @@
|
|
1 |
FROM python:3.11.5-slim
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
5 |
|
6 |
-
|
|
|
7 |
|
8 |
-
|
|
|
|
|
|
|
|
|
9 |
|
10 |
-
#
|
11 |
-
|
12 |
-
|
13 |
|
14 |
-
#
|
15 |
-
|
16 |
-
pip install --no-cache-dir -r requirements.txt
|
17 |
|
18 |
-
|
19 |
-
COPY --chown=user
|
|
|
|
|
20 |
|
21 |
-
#
|
22 |
-
|
|
|
23 |
|
24 |
# Use ENTRYPOINT to specify the command to run when the container starts
|
25 |
ENTRYPOINT ["python", "app.py"]
|
|
|
1 |
FROM python:3.11.5-slim
|
2 |
|
3 |
+
# Set the working directory to /code
|
4 |
+
WORKDIR /code
|
5 |
+
|
6 |
+
# Copy requirements.txt to working directory
|
7 |
+
COPY requirements.txt ./
|
8 |
|
9 |
+
# Upgrade pip and install dependencies
|
10 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
+
# Set up a new user named "user" with user ID 1000
|
13 |
+
RUN useradd -m -u 1000 user
|
14 |
+
|
15 |
+
# Switch to the "user" user
|
16 |
+
USER user
|
17 |
|
18 |
+
# Set home to the user's home directory
|
19 |
+
ENV HOME=/home/user \
|
20 |
+
PATH=/home/user/.local/bin:$PATH
|
21 |
|
22 |
+
# Set the working directory to the user's home directory
|
23 |
+
WORKDIR $HOME/app
|
|
|
24 |
|
25 |
+
# Copy the files/folders into the container at $HOME/app setting the owner to the user
|
26 |
+
COPY --chown=user app.py $HOME/app
|
27 |
+
COPY --chown=user src $HOME/app/src
|
28 |
+
COPY --chown=user indexes $HOME/app/indexes
|
29 |
|
30 |
+
# Copy git lfs files
|
31 |
+
RUN --chown=user cd $HOME/app/indexes && git lfs pull -I "indexes/chroma.sqlite3"
|
32 |
+
RUN --chown=user cd $HOME/app/indexes/c607d7bb-5476-4bdc-8df3-36895a74111c && git lfs pull -I "indexes/c607d7bb-5476-4bdc-8df3-36895a74111c/data_level0.bin"
|
33 |
|
34 |
# Use ENTRYPOINT to specify the command to run when the container starts
|
35 |
ENTRYPOINT ["python", "app.py"]
|
README.md
CHANGED
@@ -4,10 +4,10 @@ emoji: 🤖
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: pink
|
6 |
sdk: docker
|
|
|
7 |
pinned: true
|
8 |
license: mit
|
9 |
---
|
10 |
-
|
11 |
[](https://github.com/nikhilkomakula/llm-rag-op-chatbot/actions/workflows/main.yml)
|
12 |
|
13 |
[Try OpenPages IntelliBot Here!](https://huggingface.co/spaces/nikhilkomakula/llm-rag-op-chatbot)
|
@@ -125,7 +125,7 @@ docker logs -f llm-rag-op-chatbot
|
|
125 |
|
126 |
For any inquiries or feedback, please contact me at [[email protected]](mailto:[email protected]).
|
127 |
|
128 |
-
## License:
|
129 |
|
130 |
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT) - see the [LICENSE](LICENSE) file for details.
|
131 |
|
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: pink
|
6 |
sdk: docker
|
7 |
+
app_port: 7860
|
8 |
pinned: true
|
9 |
license: mit
|
10 |
---
|
|
|
11 |
[](https://github.com/nikhilkomakula/llm-rag-op-chatbot/actions/workflows/main.yml)
|
12 |
|
13 |
[Try OpenPages IntelliBot Here!](https://huggingface.co/spaces/nikhilkomakula/llm-rag-op-chatbot)
|
|
|
125 |
|
126 |
For any inquiries or feedback, please contact me at [[email protected]](mailto:[email protected]).
|
127 |
|
128 |
+
## License:
|
129 |
|
130 |
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT) - see the [LICENSE](LICENSE) file for details.
|
131 |
|