Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ghcr.io/huggingface/chat-ui-db:0.9.4
|
| 2 |
+
|
| 3 |
+
# Switch to root to perform necessary setup steps like copying the startup script
|
| 4 |
+
USER root
|
| 5 |
+
|
| 6 |
+
# REMOVE THESE LINES from Dockerfile. They will be in custom_startup.sh now:
|
| 7 |
+
# RUN mkdir -p /data/db
|
| 8 |
+
# RUN chown -R 1000:1000 /data/db
|
| 9 |
+
|
| 10 |
+
# Copy and make executable your custom startup script (MUST be done as root)
|
| 11 |
+
COPY custom_startup.sh /usr/local/bin/custom_startup.sh
|
| 12 |
+
RUN chmod +x /usr/local/bin/custom_startup.sh
|
| 13 |
+
|
| 14 |
+
# Switch back to the 'user' for application execution
|
| 15 |
+
USER user
|
| 16 |
+
|
| 17 |
+
# Set the working directory (assuming /app is where ChatUI expects files)
|
| 18 |
+
WORKDIR /app
|
| 19 |
+
|
| 20 |
+
# (Keep or remove these COPY lines based on whether you're bringing your own files)
|
| 21 |
+
# COPY package.json ./package.json
|
| 22 |
+
# COPY .env.local ./
|
| 23 |
+
# COPY build/ ./build/
|
| 24 |
+
# COPY .env ./
|
| 25 |
+
|
| 26 |
+
CMD ["/usr/local/bin/custom_startup.sh"]
|