forked from phoenix/litellm-mirror
build(config.yml): change base image
This commit is contained in:
parent
95efde1cb6
commit
03eda61a61
1 changed files with 40 additions and 9 deletions
|
@ -40,6 +40,7 @@ jobs:
|
|||
pip install "httpx==0.24.1"
|
||||
pip install "anyio==3.7.1"
|
||||
pip install "asyncio==3.4.3"
|
||||
pip install "PyGithub==1.59.1"
|
||||
- save_cache:
|
||||
paths:
|
||||
- ./venv
|
||||
|
@ -83,6 +84,43 @@ jobs:
|
|||
- store_test_results:
|
||||
path: test-results
|
||||
|
||||
build_and_test:
|
||||
docker:
|
||||
- image: circleci/python
|
||||
working_directory: ~/project
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker:
|
||||
version: 20.10.6
|
||||
docker_layer_caching: true
|
||||
- run:
|
||||
name: Build Docker image
|
||||
command: docker build -t my-app:latest -f Dockerfile.database .
|
||||
- run:
|
||||
name: Run Docker container
|
||||
command: |
|
||||
docker run -d \
|
||||
-p 4000:4000 \
|
||||
--name my-app \
|
||||
-v $(pwd)/proxy_server_config.yaml:/app/config.yaml \
|
||||
my-app:latest \
|
||||
--config /app/config.yaml
|
||||
- run:
|
||||
name: Install curl and dockerize
|
||||
command: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y curl
|
||||
sudo wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz
|
||||
sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz
|
||||
sudo rm dockerize-linux-amd64-v0.6.1.tar.gz
|
||||
- run:
|
||||
name: Wait for app to be ready
|
||||
command: dockerize -wait tcp://localhost:4000 -timeout 1m
|
||||
- run:
|
||||
name: Test the application
|
||||
command: curl -s "http://localhost:4000/health/readiness"
|
||||
|
||||
|
||||
publish_to_pypi:
|
||||
docker:
|
||||
- image: cimg/python:3.8
|
||||
|
@ -158,16 +196,9 @@ workflows:
|
|||
version: 2
|
||||
build_and_test:
|
||||
jobs:
|
||||
- local_testing:
|
||||
- build_and_test:
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- main
|
||||
- /litellm_.*/
|
||||
- publish_to_pypi:
|
||||
requires:
|
||||
- local_testing
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- main
|
||||
- /litellm_.*/
|
Loading…
Add table
Add a link
Reference in a new issue