Commit
·
c8916af
1
Parent(s):
dfcb55a
Build Responsible AI assistant
Browse files- Dockerfile +32 -0
- README.md +4 -4
Dockerfile
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11
|
| 2 |
+
|
| 3 |
+
# Create a non-root user
|
| 4 |
+
RUN useradd -m -u 1000 user
|
| 5 |
+
|
| 6 |
+
# Create the application directory and ensure it has the correct permissions
|
| 7 |
+
RUN mkdir -p /home/user/app && chown user:user /home/user/app
|
| 8 |
+
|
| 9 |
+
# Set environment variables
|
| 10 |
+
ENV HOME=/home/user \
|
| 11 |
+
PATH=/home/user/.local/bin:$PATH
|
| 12 |
+
|
| 13 |
+
# Switch to the non-root user
|
| 14 |
+
USER user
|
| 15 |
+
|
| 16 |
+
# Set the initial working directory
|
| 17 |
+
WORKDIR $HOME/app
|
| 18 |
+
|
| 19 |
+
# Clone the Git repository
|
| 20 |
+
RUN git clone https://github.com/brlrb/responsible-ai-assistant.git .
|
| 21 |
+
|
| 22 |
+
# Change working directory to the 'app/' directory within the cloned repository
|
| 23 |
+
WORKDIR $HOME/app/app
|
| 24 |
+
|
| 25 |
+
# Install requirements
|
| 26 |
+
RUN pip install --user -r requirements.txt
|
| 27 |
+
|
| 28 |
+
# Copy the rest of your application (if needed) into the 'app/' directory
|
| 29 |
+
COPY --chown=user . ./
|
| 30 |
+
|
| 31 |
+
# Command to run your application
|
| 32 |
+
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
---
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Responsible AI Assistant
|
| 3 |
+
emoji: 🤖
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: orange
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
---
|