File size: 2,819 Bytes
91a7855
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1fd084a
91a7855
 
 
 
 
007898d
91a7855
 
 
212b67b
91a7855
 
01076bc
 
 
91a7855
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#Pull the base image
FROM ghcr.io/danny-avila/librechat-dev:latest


#FROM ghcr.io/danny-avila/librechat-dev:d3d7d11ea8cbeef9fdffa1eb45d6b866e6ee182b




# Set environment variables
ENV HOST=0.0.0.0
ENV PORT=7860
ENV SESSION_EXPIRY=900000
ENV REFRESH_TOKEN_EXPIRY=604800000
# ENV MEILI_NO_ANALYTICS=true
# ENV MEILI_HOST=https://librechat-meilisearch.hf.space

# Create necessary directories
RUN mkdir -p /app/uploads/temp
RUN mkdir -p /app/client/public/images/temp
RUN mkdir -p /app/api/logs/
RUN mkdir -p /app/data
RUN mkdir -p /app/code_interpreter

# Give write permission to the directory
RUN chmod -R 777 /app/uploads/temp
RUN chmod -R 777 /app/client/public/images
RUN chmod -R 777 /app/api/logs/
RUN chmod -R 777 /app/data
RUN chmod -R 777 /app/code_interpreter

# RUN cd /app/packages/mcp/src/ && rm -rf  manager.ts 

# Copy Custom Endpoints Config
# RUN curl -o /app/librechat.yaml https://raw.githubusercontent.com/LibreChat-AI/librechat-config-yaml/main/librechat-hf.yaml
COPY librechat.yaml /app/librechat.yaml 
COPY tests.py /app/tests.py
COPY streamlit_app.py /app/streamlit_app.py
COPY gradio_file.py /app/gradio_file.py

# Install dependencies
RUN cd /app/api && npm install 
USER root
# COPY manager.ts /app/packages/mcp/src/manager.ts

# Install Python and pip
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3-dev  git py3-pip gcc libc-dev bash libc6-compat build-base mpc1-dev && ln -sf python3 /usr/bin/python
# RUN apk --update --no-cache add python3~3.10    --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main 
# RUN apk add --update --no-cache  git  gcc libc-dev libc6-compat build-base mpc1-dev && ln -sf python3 /usr/bin/python

# RUN python3 -m ensurepip    

RUN pip3 install --no-cache --upgrade  --break-system-packages pip pexpect setuptools mcp mcp-simple-pubmed mcp-simple-arxiv e2b-code-interpreter==1.0.4b litellm gradio XlsxWriter openpyxl google-genai  requests-futures
# RUN cd /app/packages && git clone  --branch patch-1 https://github.com/vaibhavard/actors-mcp-server 
# RUN cd /app/packages/actors-mcp-server/ && npm install  && npm run build  && npm link
# RUN git clone https://github.com/e2b-dev/mcp-server && cd mcp-server/packages/js/ && npm install && npm run build && npm link
#  to run on container star
RUN git clone https://github.com/AIGENHACKER/mcp-hfspace && cd mcp-hfspace && npm install && npm run build && npm link
RUN git clone https://github.com/exa-labs/exa-mcp-server  && cd exa-mcp-server  && npm install --save axios dotenv && npm run build && npm link 
RUN wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz -O ngrok.tgz && tar xvzf ngrok.tgz &&  cp ngrok /usr/local/bin && rm ngrok.tgz 
USER node
RUN ngrok config add-authtoken 1rQyCAEayMQPbF92tUV79xzU47t_52jLQDywBZLtLzqYuDAK2
CMD ["npm", "run", "backend"]