Skip to content

Commit

Permalink
(fix) clean up root repo - move entrypoint.sh and build_admin_ui to /…
Browse files Browse the repository at this point in the history
…docker (BerriAI#6110)

* fix move docker files to docker folders

* move check file length

* fix docker hub deploy

* fix clean up root

* fix circle ci config
  • Loading branch information
ishaan-jaff authored Oct 8, 2024
1 parent cc960da commit d1760b1
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ jobs:
- ./venv
key: v1-dependencies-{{ checksum ".circleci/requirements.txt" }}
- run:
name: Run prisma ./entrypoint.sh
name: Run prisma ./docker/entrypoint.sh
command: |
set +e
chmod +x entrypoint.sh
./entrypoint.sh
chmod +x docker/entrypoint.sh
./docker/entrypoint.sh
set -e
- run:
name: Black Formatting
Expand Down Expand Up @@ -128,11 +128,11 @@ jobs:
- ./venv
key: v1-dependencies-{{ checksum ".circleci/requirements.txt" }}
- run:
name: Run prisma ./entrypoint.sh
name: Run prisma ./docker/entrypoint.sh
command: |
set +e
chmod +x entrypoint.sh
./entrypoint.sh
chmod +x docker/entrypoint.sh
./docker/entrypoint.sh
set -e
# Run pytest and generate JUnit XML report
- run:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN pip install --upgrade pip && \
COPY . .

# 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
RUN rm -rf dist/* && python -m build
Expand All @@ -44,7 +44,7 @@ RUN pip uninstall PyJWT -y
RUN pip install PyJWT==2.9.0 --no-cache-dir

# 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
FROM $LITELLM_RUNTIME_IMAGE AS runtime
Expand All @@ -66,7 +66,7 @@ RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ && rm -f *.whl

# Generate prisma client
RUN prisma generate
RUN chmod +x entrypoint.sh
RUN chmod +x docker/entrypoint.sh

EXPOSE 4000/tcp

Expand Down
4 changes: 2 additions & 2 deletions deploy/Dockerfile.ghcr_base
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ WORKDIR /app
# Copy the configuration file into the container at /app
COPY config.yaml .

# Make sure your entrypoint.sh is executable
RUN chmod +x entrypoint.sh
# Make sure your docker/entrypoint.sh is executable
RUN chmod +x docker/entrypoint.sh

# Expose the necessary port
EXPOSE 4000/tcp
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.custom_ui
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ RUN rm -rf /app/litellm/proxy/_experimental/out/* && \
# Switch back to the main app directory
WORKDIR /app

# Make sure your entrypoint.sh is executable
RUN chmod +x entrypoint.sh
# Make sure your docker/entrypoint.sh is executable
RUN chmod +x docker/entrypoint.sh

# Expose the necessary port
EXPOSE 4000/tcp
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.database
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN pip install --upgrade pip && \
COPY . .

# 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
RUN rm -rf dist/* && python -m build
Expand Down Expand Up @@ -62,11 +62,11 @@ RUN pip uninstall PyJWT -y
RUN pip install PyJWT==2.9.0 --no-cache-dir

# 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
RUN prisma generate
RUN chmod +x entrypoint.sh
RUN chmod +x docker/entrypoint.sh

EXPOSE 4000/tcp

Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.non_root
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN pip install --upgrade pip && \
COPY . .

# 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
RUN rm -rf dist/* && python -m build
Expand Down Expand Up @@ -62,7 +62,7 @@ RUN pip uninstall PyJWT -y
RUN pip install PyJWT==2.9.0 --no-cache-dir

# 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
ENV PRISMA_BINARY_CACHE_DIR=/app/prisma
Expand All @@ -71,7 +71,7 @@ RUN chmod -R 777 /.cache
RUN pip install nodejs-bin
RUN pip install prisma
RUN prisma generate
RUN chmod +x entrypoint.sh
RUN chmod +x docker/entrypoint.sh

EXPOSE 4000/tcp

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/my-website/docs/proxy/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ WORKDIR /app
# Copy the configuration file into the container at /app
COPY config.yaml .

# Make sure your entrypoint.sh is executable
# Make sure your docker/entrypoint.sh is executable
RUN chmod +x entrypoint.sh

# Expose the necessary port
Expand Down
4 changes: 2 additions & 2 deletions tests/test_entrypoint.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# What is this?
## Unit tests for 'entrypoint.sh'
## Unit tests for 'docker/entrypoint.sh'

import pytest
import sys
Expand Down Expand Up @@ -35,7 +35,7 @@ def test_entrypoint_decrypt_and_reset():
os.environ["DATABASE_URL"] = (
"aws_kms/AQICAHgwddjZ9xjVaZ9CNCG8smFU6FiQvfdrjL12DIqi9vUAQwHwF6U7caMgHQa6tK+TzaoMAAAAzjCBywYJKoZIhvcNAQcGoIG9MIG6AgEAMIG0BgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDCmu+DVeKTm5tFZu6AIBEICBhnOFQYviL8JsciGk0bZsn9pfzeYWtNkVXEsl01AdgHBqT9UOZOI4ZC+T3wO/fXA7wdNF4o8ASPDbVZ34ZFdBs8xt4LKp9niufL30WYBkuuzz89ztly0jvE9pZ8L6BMw0ATTaMgIweVtVSDCeCzEb5PUPyxt4QayrlYHBGrNH5Aq/axFTe0La"
)
command = "./entrypoint.sh"
command = "./docker/entrypoint.sh"
directory = ".." # Relative to the current directory

# Run the command using subprocess
Expand Down

0 comments on commit d1760b1

Please sign in to comment.