(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 # 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"]