(temp) use database dockerfile for railway

This commit is contained in:
ishaan-jaff 2024-01-09 13:44:37 +05:30
parent 599318b40e
commit 28f7ccbcd1

View file

@ -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"]