reztilop commited on
Commit
46328e0
·
verified ·
1 Parent(s): 20f1536

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -27
Dockerfile CHANGED
@@ -1,36 +1,21 @@
1
- # Use the provided base image
2
- FROM ghcr.io/berriai/litellm:main-latest
3
 
4
- # Set the working directory to /app
5
- WORKDIR /app
6
 
7
- # Copy the configuration file into the container at /app
8
- COPY config.yaml .
9
 
10
- # Make sure your docker/entrypoint.sh is executable
11
- RUN chmod +x ./docker/entrypoint.sh
12
 
13
- # Create the necessary cache directory with appropriate permissions
14
- RUN mkdir -p /.cache/prisma-python/binaries && chmod -R 777 /.cache
15
 
16
- # Install Node.js and npm
17
- RUN apt-get update && \
18
- apt-get install -y curl && \
19
- curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
20
- apt-get install -y nodejs && \
21
- npm install -g [email protected]
22
 
23
- # Create the necessary npm directory with appropriate permissions
24
- RUN mkdir -p /.npm && chown -R 1000:0 /.npm
25
 
26
- # Expose the necessary port
27
  EXPOSE 7860/tcp
28
 
29
- # Verify that the config file exists
30
- RUN if [ ! -f /app/config.yaml ]; then echo "config.yaml not found!" && exit 1; fi
31
-
32
- # Override the CMD instruction with your desired command and arguments
33
- # WARNING: FOR PROD DO NOT USE `--detailed_debug` it slows down response times, instead use the following CMD
34
- # CMD ["--port", "7860", "--config", "/app/config.yaml"]
35
-
36
- CMD ["--port", "7860", "--config", "/app/config.yaml"]
 
1
+ FROM ghcr.io/berriai/litellm
 
2
 
3
+ # Définir un répertoire de cache avec les bonnes permissions
4
+ ENV PRISMA_CACHE_DIR=/tmp/prisma-cache
5
 
6
+ # Créer le répertoire de cache et définir les permissions
7
+ RUN mkdir -p $PRISMA_CACHE_DIR && chmod -R 777 $PRISMA_CACHE_DIR
8
 
9
+ WORKDIR /app
 
10
 
11
+ COPY config.yaml .
 
12
 
13
+ # Assurez-vous que la base de données est correctement configurée
14
+ ENV DATABASE_URL=votre_url_de_base_de_données
 
 
 
 
15
 
16
+ # Désactiver la vérification de santé Prisma si non nécessaire
17
+ ENV LITELLM_PROXY_SKIP_PRISMA_HEALTH_CHECK=true
18
 
 
19
  EXPOSE 7860/tcp
20
 
21
+ CMD ["--port", "7860", "--config", "config.yaml"]