mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(temp) use database dockerfile for railway
This commit is contained in:
parent
599318b40e
commit
28f7ccbcd1
1 changed files with 5 additions and 12 deletions
17
Dockerfile
17
Dockerfile
|
@ -34,7 +34,6 @@ RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
|
|||
|
||||
# Runtime stage
|
||||
FROM $LITELLM_RUNTIME_IMAGE as runtime
|
||||
ARG with_database
|
||||
|
||||
WORKDIR /app
|
||||
# Copy the current directory contents into the container at /app
|
||||
|
@ -46,19 +45,13 @@ COPY --from=builder /app/dist/*.whl .
|
|||
COPY --from=builder /wheels/ /wheels/
|
||||
|
||||
# Install the built wheel using pip; again using a wildcard if it's the only file
|
||||
RUN pip install --no-cache-dir --find-links=/wheels/ -r requirements.txt \
|
||||
&& pip install *.whl \
|
||||
&& rm -f *.whl
|
||||
RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ && rm -f *.whl && rm -rf /wheels
|
||||
|
||||
# if user has set os.environ['DATABASE_URL'] != None, run prisma generate
|
||||
RUN echo "DATABASE_URL is set to: $DATABASE_URL"
|
||||
RUN if [ -n "$DATABASE_URL" ]; then \
|
||||
echo "DATABASE_URL is set to: $DATABASE_URL"; \
|
||||
prisma generate; \
|
||||
fi
|
||||
# Generate prisma client
|
||||
RUN prisma generate
|
||||
RUN chmod +x entrypoint.sh
|
||||
|
||||
EXPOSE 4000/tcp
|
||||
|
||||
# Set your entrypoint and command
|
||||
ENTRYPOINT ["litellm"]
|
||||
CMD ["--port", "4000"]
|
||||
CMD ["./entrypoint.sh"]
|
Loading…
Add table
Add a link
Reference in a new issue