docs: Update README with Docker build and run instructions; add Dockerfile for container setup
Browse files- Dockerfile +34 -0
- README.md +9 -1
Dockerfile
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# Get a distribution that has uv already installed
|
| 3 |
+
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim
|
| 4 |
+
|
| 5 |
+
# Add user - this is the user that will run the app
|
| 6 |
+
# If you do not set user, the app will run as root (undesirable)
|
| 7 |
+
RUN useradd -m -u 1000 user
|
| 8 |
+
USER user
|
| 9 |
+
|
| 10 |
+
# Set the home directory and path
|
| 11 |
+
ENV HOME=/home/user \
|
| 12 |
+
PATH=/home/user/.local/bin:$PATH
|
| 13 |
+
|
| 14 |
+
ENV UVICORN_WS_PROTOCOL=websockets
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
# Set the working directory
|
| 18 |
+
WORKDIR $HOME/app
|
| 19 |
+
|
| 20 |
+
# Copy the app to the container
|
| 21 |
+
COPY --chown=user ./py-src/ $HOME/app
|
| 22 |
+
COPY --chown=user ./pyproject.toml $HOME/app
|
| 23 |
+
COPY --chown=user ./uv.lock $HOME/app
|
| 24 |
+
|
| 25 |
+
# Install the dependencies
|
| 26 |
+
# RUN uv sync --frozen
|
| 27 |
+
RUN uv sync
|
| 28 |
+
#copdy vectorstore
|
| 29 |
+
COPY --chown=user ./db/ $HOME/app/db
|
| 30 |
+
# Expose the port
|
| 31 |
+
EXPOSE 7860
|
| 32 |
+
|
| 33 |
+
# Run the app
|
| 34 |
+
CMD ["uv", "run", "chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
CHANGED
|
@@ -19,4 +19,12 @@ Under the hood, this application uses:
|
|
| 19 |
|
| 20 |
## Sources
|
| 21 |
|
| 22 |
-
All answers are generated based on content from [TheDataGuy blog](https://thedataguy.pro/blog/). Sources are shown for each response so you can read more about the topic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
## Sources
|
| 21 |
|
| 22 |
+
All answers are generated based on content from [TheDataGuy blog](https://thedataguy.pro/blog/). Sources are shown for each response so you can read more about the topic.
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
docker build -t lets-talk.
|
| 27 |
+
docker run -p 7860:7860 \
|
| 28 |
+
--env-file ./.env \
|
| 29 |
+
lets-talk
|
| 30 |
+
```
|