Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +37 -0
Dockerfile
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Pull the base image
|
2 |
+
FROM ghcr.io/danny-avila/librechat-dev:latest
|
3 |
+
|
4 |
+
# FROM ghcr.io/danny-avila/librechat-dev:0a1d38e3189a4f905d021be41ac2c8b5bd03d8b7
|
5 |
+
|
6 |
+
|
7 |
+
# Set environment variables
|
8 |
+
ENV HOST=0.0.0.0
|
9 |
+
ENV PORT=7860
|
10 |
+
ENV SESSION_EXPIRY=900000
|
11 |
+
ENV REFRESH_TOKEN_EXPIRY=604800000
|
12 |
+
ENV SEARCH=false
|
13 |
+
# ENV MEILI_NO_ANALYTICS=true
|
14 |
+
# ENV MEILI_HOST=https://librechat-meilisearch.hf.space
|
15 |
+
|
16 |
+
# Create necessary directories
|
17 |
+
RUN mkdir -p /app/uploads/temp
|
18 |
+
RUN mkdir -p /app/client/public/images/temp
|
19 |
+
RUN mkdir -p /app/api/logs/
|
20 |
+
RUN mkdir -p /app/data
|
21 |
+
|
22 |
+
# Give write permission to the directory
|
23 |
+
RUN chmod -R 777 /app/uploads/temp
|
24 |
+
RUN chmod -R 777 /app/client/public/images
|
25 |
+
RUN chmod -R 777 /app/api/logs/
|
26 |
+
RUN chmod -R 777 /app/data
|
27 |
+
|
28 |
+
|
29 |
+
# Copy Custom Endpoints Config
|
30 |
+
# RUN curl -o /app/librechat.yaml https://raw.githubusercontent.com/LibreChat-AI/librechat-config-yaml/main/librechat-hf.yaml
|
31 |
+
COPY librechat.yaml /app/librechat.yaml # Uncomment this and comment out the previous line to use the local librechat.yaml
|
32 |
+
|
33 |
+
# Install dependencies
|
34 |
+
RUN cd /app/api && npm install
|
35 |
+
|
36 |
+
# Command to run on container start
|
37 |
+
CMD ["npm", "run", "backend"]
|