forked from phoenix/litellm-mirror
(fix) clean up root repo - move entrypoint.sh and build_admin_ui to /docker (#6110)
* fix move docker files to docker folders * move check file length * fix docker hub deploy * fix clean up root * fix circle ci config
This commit is contained in:
parent
cc960da4b6
commit
d1760b1b04
10 changed files with 22 additions and 22 deletions
|
@ -69,11 +69,11 @@ jobs:
|
||||||
- ./venv
|
- ./venv
|
||||||
key: v1-dependencies-{{ checksum ".circleci/requirements.txt" }}
|
key: v1-dependencies-{{ checksum ".circleci/requirements.txt" }}
|
||||||
- run:
|
- run:
|
||||||
name: Run prisma ./entrypoint.sh
|
name: Run prisma ./docker/entrypoint.sh
|
||||||
command: |
|
command: |
|
||||||
set +e
|
set +e
|
||||||
chmod +x entrypoint.sh
|
chmod +x docker/entrypoint.sh
|
||||||
./entrypoint.sh
|
./docker/entrypoint.sh
|
||||||
set -e
|
set -e
|
||||||
- run:
|
- run:
|
||||||
name: Black Formatting
|
name: Black Formatting
|
||||||
|
@ -128,11 +128,11 @@ jobs:
|
||||||
- ./venv
|
- ./venv
|
||||||
key: v1-dependencies-{{ checksum ".circleci/requirements.txt" }}
|
key: v1-dependencies-{{ checksum ".circleci/requirements.txt" }}
|
||||||
- run:
|
- run:
|
||||||
name: Run prisma ./entrypoint.sh
|
name: Run prisma ./docker/entrypoint.sh
|
||||||
command: |
|
command: |
|
||||||
set +e
|
set +e
|
||||||
chmod +x entrypoint.sh
|
chmod +x docker/entrypoint.sh
|
||||||
./entrypoint.sh
|
./docker/entrypoint.sh
|
||||||
set -e
|
set -e
|
||||||
# Run pytest and generate JUnit XML report
|
# Run pytest and generate JUnit XML report
|
||||||
- run:
|
- run:
|
||||||
|
|
|
@ -21,7 +21,7 @@ RUN pip install --upgrade pip && \
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build Admin UI
|
# Build Admin UI
|
||||||
RUN chmod +x build_admin_ui.sh && ./build_admin_ui.sh
|
RUN chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
|
||||||
|
|
||||||
# Build the package
|
# Build the package
|
||||||
RUN rm -rf dist/* && python -m build
|
RUN rm -rf dist/* && python -m build
|
||||||
|
@ -44,7 +44,7 @@ RUN pip uninstall PyJWT -y
|
||||||
RUN pip install PyJWT==2.9.0 --no-cache-dir
|
RUN pip install PyJWT==2.9.0 --no-cache-dir
|
||||||
|
|
||||||
# Build Admin UI
|
# Build Admin UI
|
||||||
RUN chmod +x build_admin_ui.sh && ./build_admin_ui.sh
|
RUN chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
|
||||||
|
|
||||||
# Runtime stage
|
# Runtime stage
|
||||||
FROM $LITELLM_RUNTIME_IMAGE AS runtime
|
FROM $LITELLM_RUNTIME_IMAGE AS runtime
|
||||||
|
@ -66,7 +66,7 @@ RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ && rm -f *.whl
|
||||||
|
|
||||||
# Generate prisma client
|
# Generate prisma client
|
||||||
RUN prisma generate
|
RUN prisma generate
|
||||||
RUN chmod +x entrypoint.sh
|
RUN chmod +x docker/entrypoint.sh
|
||||||
|
|
||||||
EXPOSE 4000/tcp
|
EXPOSE 4000/tcp
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ WORKDIR /app
|
||||||
# Copy the configuration file into the container at /app
|
# Copy the configuration file into the container at /app
|
||||||
COPY config.yaml .
|
COPY config.yaml .
|
||||||
|
|
||||||
# Make sure your entrypoint.sh is executable
|
# Make sure your docker/entrypoint.sh is executable
|
||||||
RUN chmod +x entrypoint.sh
|
RUN chmod +x docker/entrypoint.sh
|
||||||
|
|
||||||
# Expose the necessary port
|
# Expose the necessary port
|
||||||
EXPOSE 4000/tcp
|
EXPOSE 4000/tcp
|
||||||
|
|
|
@ -31,8 +31,8 @@ RUN rm -rf /app/litellm/proxy/_experimental/out/* && \
|
||||||
# Switch back to the main app directory
|
# Switch back to the main app directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Make sure your entrypoint.sh is executable
|
# Make sure your docker/entrypoint.sh is executable
|
||||||
RUN chmod +x entrypoint.sh
|
RUN chmod +x docker/entrypoint.sh
|
||||||
|
|
||||||
# Expose the necessary port
|
# Expose the necessary port
|
||||||
EXPOSE 4000/tcp
|
EXPOSE 4000/tcp
|
||||||
|
|
|
@ -21,7 +21,7 @@ RUN pip install --upgrade pip && \
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build Admin UI
|
# Build Admin UI
|
||||||
RUN chmod +x build_admin_ui.sh && ./build_admin_ui.sh
|
RUN chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
|
||||||
|
|
||||||
# Build the package
|
# Build the package
|
||||||
RUN rm -rf dist/* && python -m build
|
RUN rm -rf dist/* && python -m build
|
||||||
|
@ -62,11 +62,11 @@ RUN pip uninstall PyJWT -y
|
||||||
RUN pip install PyJWT==2.9.0 --no-cache-dir
|
RUN pip install PyJWT==2.9.0 --no-cache-dir
|
||||||
|
|
||||||
# Build Admin UI
|
# Build Admin UI
|
||||||
RUN chmod +x build_admin_ui.sh && ./build_admin_ui.sh
|
RUN chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
|
||||||
|
|
||||||
# Generate prisma client
|
# Generate prisma client
|
||||||
RUN prisma generate
|
RUN prisma generate
|
||||||
RUN chmod +x entrypoint.sh
|
RUN chmod +x docker/entrypoint.sh
|
||||||
|
|
||||||
EXPOSE 4000/tcp
|
EXPOSE 4000/tcp
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ RUN pip install --upgrade pip && \
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build Admin UI
|
# Build Admin UI
|
||||||
RUN chmod +x build_admin_ui.sh && ./build_admin_ui.sh
|
RUN chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
|
||||||
|
|
||||||
# Build the package
|
# Build the package
|
||||||
RUN rm -rf dist/* && python -m build
|
RUN rm -rf dist/* && python -m build
|
||||||
|
@ -62,7 +62,7 @@ RUN pip uninstall PyJWT -y
|
||||||
RUN pip install PyJWT==2.9.0 --no-cache-dir
|
RUN pip install PyJWT==2.9.0 --no-cache-dir
|
||||||
|
|
||||||
# Build Admin UI
|
# Build Admin UI
|
||||||
RUN chmod +x build_admin_ui.sh && ./build_admin_ui.sh
|
RUN chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
|
||||||
|
|
||||||
# Generate prisma client
|
# Generate prisma client
|
||||||
ENV PRISMA_BINARY_CACHE_DIR=/app/prisma
|
ENV PRISMA_BINARY_CACHE_DIR=/app/prisma
|
||||||
|
@ -71,7 +71,7 @@ RUN chmod -R 777 /.cache
|
||||||
RUN pip install nodejs-bin
|
RUN pip install nodejs-bin
|
||||||
RUN pip install prisma
|
RUN pip install prisma
|
||||||
RUN prisma generate
|
RUN prisma generate
|
||||||
RUN chmod +x entrypoint.sh
|
RUN chmod +x docker/entrypoint.sh
|
||||||
|
|
||||||
EXPOSE 4000/tcp
|
EXPOSE 4000/tcp
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ WORKDIR /app
|
||||||
# Copy the configuration file into the container at /app
|
# Copy the configuration file into the container at /app
|
||||||
COPY config.yaml .
|
COPY config.yaml .
|
||||||
|
|
||||||
# Make sure your entrypoint.sh is executable
|
# Make sure your docker/entrypoint.sh is executable
|
||||||
RUN chmod +x entrypoint.sh
|
RUN chmod +x entrypoint.sh
|
||||||
|
|
||||||
# Expose the necessary port
|
# Expose the necessary port
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# What is this?
|
# What is this?
|
||||||
## Unit tests for 'entrypoint.sh'
|
## Unit tests for 'docker/entrypoint.sh'
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import sys
|
import sys
|
||||||
|
@ -35,7 +35,7 @@ def test_entrypoint_decrypt_and_reset():
|
||||||
os.environ["DATABASE_URL"] = (
|
os.environ["DATABASE_URL"] = (
|
||||||
"aws_kms/AQICAHgwddjZ9xjVaZ9CNCG8smFU6FiQvfdrjL12DIqi9vUAQwHwF6U7caMgHQa6tK+TzaoMAAAAzjCBywYJKoZIhvcNAQcGoIG9MIG6AgEAMIG0BgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDCmu+DVeKTm5tFZu6AIBEICBhnOFQYviL8JsciGk0bZsn9pfzeYWtNkVXEsl01AdgHBqT9UOZOI4ZC+T3wO/fXA7wdNF4o8ASPDbVZ34ZFdBs8xt4LKp9niufL30WYBkuuzz89ztly0jvE9pZ8L6BMw0ATTaMgIweVtVSDCeCzEb5PUPyxt4QayrlYHBGrNH5Aq/axFTe0La"
|
"aws_kms/AQICAHgwddjZ9xjVaZ9CNCG8smFU6FiQvfdrjL12DIqi9vUAQwHwF6U7caMgHQa6tK+TzaoMAAAAzjCBywYJKoZIhvcNAQcGoIG9MIG6AgEAMIG0BgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDCmu+DVeKTm5tFZu6AIBEICBhnOFQYviL8JsciGk0bZsn9pfzeYWtNkVXEsl01AdgHBqT9UOZOI4ZC+T3wO/fXA7wdNF4o8ASPDbVZ34ZFdBs8xt4LKp9niufL30WYBkuuzz89ztly0jvE9pZ8L6BMw0ATTaMgIweVtVSDCeCzEb5PUPyxt4QayrlYHBGrNH5Aq/axFTe0La"
|
||||||
)
|
)
|
||||||
command = "./entrypoint.sh"
|
command = "./docker/entrypoint.sh"
|
||||||
directory = ".." # Relative to the current directory
|
directory = ".." # Relative to the current directory
|
||||||
|
|
||||||
# Run the command using subprocess
|
# Run the command using subprocess
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue