File size: 2,342 Bytes
ab2f69c fd1c967 6ca9913 591b48a 3b6afc0 998872b 226a847 c87a70f d247f04 b99f761 fa62d08 b99f761 bf8fc6f ab2f69c 3b6afc0 ab2f69c |
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 |
# Pull the base image
FROM ghcr.io/danny-avila/librechat-dev:latest
# FROM ghcr.io/danny-avila/librechat:latest # Uncomment this and comment out the previous line for the less up to date but more stable release
# 在构建过程中增加更改权限的步骤
RUN mkdir -p /app/api/logs/ && chmod -R 777 /app/api/logs/
# Set environment variables
ENV HOST=0.0.0.0
ENV PORT=7860
ENV SESSION_EXPIRY=900000
ENV REFRESH_TOKEN_EXPIRY=604800000
#ENV OPENAI_MODELS=gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-4,gpt-4-0314,gpt-4-0613,gpt-4-32k,gpt-4-32k-0613,gpt-4-1106-preview,gpt-4-vision-preview,dall-e-2,dall-e-3,Creative,Balanced,Precise
#ENV PLUGIN_MODELS=gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-4,gpt-4-0314,gpt-4-0613,gpt-4-32k,gpt-4-32k-0613,gpt-4-1106-preview,gpt-4-vision-preview,Creative,Balanced,Precise
ENV PLUGIN_MODELS=gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-3.5-turbo-1106,gpt-3.5-turbo-0301,gpt-3.5-turbo-instruct,gpt-3.5-turbo-0125,chatglm_pro,gpt-4-plus,gpt-4-plugs,gpt-4-plugins,gpt-4,gpt-4-0314,gpt-4-0613,gpt-4-32k,gpt-4-32k-0613,claude-3-sonnet,claude-3-opus,claude-3-sonnet-20240229,claude-3-opus-20240229,gpt-4-1106-preview,gpt-4-vision-preview,gemini-pro,gemini-pro-vision,chat-gpt-4-vision-preview,dall-e-3,glm-4-all,gpt-4-0125-preview,gpt-4-all,chat-midjourney,mj-chat,stable-diffusion,tts-1-hd-1106,tts-1,tts-1-hd,tts-1-1106,midjourney
ENV OPENAI_MODELS=gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-3.5-turbo-1106,gpt-3.5-turbo-0301,gpt-3.5-turbo-instruct,gpt-3.5-turbo-0125,chatglm_pro,gpt-4-plus,gpt-4-plugs,gpt-4-plugins,gpt-4,gpt-4-0314,gpt-4-0613,gpt-4-32k,gpt-4-32k-0613,claude-3-sonnet,claude-3-opus,claude-3-sonnet-20240229,claude-3-opus-20240229,gpt-4-1106-preview,gpt-4-vision-preview,gemini-pro,gemini-pro-vision,chat-gpt-4-vision-preview,dall-e-3,glm-4-all,gpt-4-0125-preview,gpt-4-all,chat-midjourney,mj-chat,stable-diffusion,tts-1-hd-1106,tts-1,tts-1-hd,tts-1-1106,midjourney
ENV SEARCH=true
ENV MEILI_NO_ANALYTICS=true
ENV MEILI_HOST=https://librechat-meilisearch.hf.space
ENV MEILI_HTTP_ADDR=https://librechat-meilisearch.hf.space
# Create necessary directories for vision
RUN mkdir -p /app/client/public/images/temp
# Give write permission to the directory
RUN chmod -R 777 /app/client/public/images
# Install dependencies
RUN cd /app/api && npm install
# Command to run on container start
CMD ["npm", "run", "backend"] |