forked from phoenix/litellm-mirror
(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
|
# Runtime stage
|
||||||
FROM $LITELLM_RUNTIME_IMAGE as runtime
|
FROM $LITELLM_RUNTIME_IMAGE as runtime
|
||||||
ARG with_database
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# Copy the current directory contents into the container at /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/
|
COPY --from=builder /wheels/ /wheels/
|
||||||
|
|
||||||
# Install the built wheel using pip; again using a wildcard if it's the only file
|
# 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 \
|
RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ && rm -f *.whl && rm -rf /wheels
|
||||||
&& pip install *.whl \
|
|
||||||
&& rm -f *.whl
|
|
||||||
|
|
||||||
# if user has set os.environ['DATABASE_URL'] != None, run prisma generate
|
# Generate prisma client
|
||||||
RUN echo "DATABASE_URL is set to: $DATABASE_URL"
|
RUN prisma generate
|
||||||
RUN if [ -n "$DATABASE_URL" ]; then \
|
RUN chmod +x entrypoint.sh
|
||||||
echo "DATABASE_URL is set to: $DATABASE_URL"; \
|
|
||||||
prisma generate; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
EXPOSE 4000/tcp
|
EXPOSE 4000/tcp
|
||||||
|
|
||||||
# Set your entrypoint and command
|
# Set your entrypoint and command
|
||||||
ENTRYPOINT ["litellm"]
|
CMD ["./entrypoint.sh"]
|
||||||
CMD ["--port", "4000"]
|
|
Loading…
Add table
Add a link
Reference in a new issue