Librechat-Advanced / Dockerfile
akiko19191's picture
Update Dockerfile
1fd084a verified
raw
history blame
2.57 kB
#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 start
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
CMD ["npm", "run", "backend"]