FunJim commited on
Commit
df6c0f8
·
1 Parent(s): 4c7657b

Add Dockerfile and configuration files for Litellm setup

Browse files
Files changed (3) hide show
  1. Dockerfile +9 -0
  2. README.md +1 -0
  3. litellm_config.yaml +7 -0
Dockerfile ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from ghcr.io/berriai/litellm:main-stable
2
+
3
+ ENV TZ=Asia/Shanghai SERVER_ROOT_PATH=/hf/v1 OPENAI_API_KEY=any
4
+
5
+ COPY ./litellm_config.yaml /app/config.yaml
6
+ EXPOSE 7860
7
+
8
+ ENTRYPOINT ["litellm"]
9
+ CMD [ "--config", "/app/config.yaml", "--port", "7860", "--num_workers", "8" ]
README.md CHANGED
@@ -6,6 +6,7 @@ colorTo: indigo
6
  sdk: docker
7
  pinned: false
8
  license: apache-2.0
 
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
6
  sdk: docker
7
  pinned: false
8
  license: apache-2.0
9
+ app_port: 7860
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
litellm_config.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ model_list:
2
+ - model_name: azure-gpt-4o
3
+ litellm_params:
4
+ model: azure/<your-azure-model-deployment>
5
+ api_base: os.environ/AZURE_API_BASE # runs os.getenv("AZURE_API_BASE")
6
+ api_key: os.environ/AZURE_API_KEY # runs os.getenv("AZURE_API_KEY")
7
+ api_version: "2025-01-01-preview"