ateetvatan commited on
Commit
06c095f
Β·
1 Parent(s): fe3c91f

add CD settings

Browse files
Files changed (3) hide show
  1. .github/workflows/deploy-hf.yml +20 -0
  2. Dockerfile +21 -0
  3. README.md +11 -0
.github/workflows/deploy-hf.yml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Deploy to Hugging Face Space masx-openchat-llm
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ] # or your deployment branch
6
+
7
+ jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - name: Checkout repo
13
+ uses: actions/checkout@v3
14
+
15
+ - name: Upload to Hugging Face Space
16
+ uses: huggingface/[email protected]
17
+ with:
18
+ api_token: ${{ secrets.HF_TOKEN }}
19
+ repo_id: AteetVatan/masx-openchat-llm
20
+ repo_type: space
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM python:3.10-slim
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6
+
7
+ # Create app directory
8
+ WORKDIR /app
9
+
10
+ # Copy requirements and install
11
+ COPY requirements.txt .
12
+ RUN pip install --upgrade pip && pip install -r requirements.txt
13
+
14
+ # Copy all project files
15
+ COPY . .
16
+
17
+ # Expose port (default for HF Spaces)
18
+ EXPOSE 7860
19
+
20
+ # Run the app
21
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -8,6 +8,17 @@ MASX OpenChat LLM powered by the state-of-the-art OpenChat-3.5 model.
8
 
9
  - **Powered by OpenChat-3.5**: Latest conversational AI model with 7B parameters
10
 
 
 
 
 
 
 
 
 
 
 
 
11
  ## Quick Start
12
 
13
  ### Requirements
 
8
 
9
  - **Powered by OpenChat-3.5**: Latest conversational AI model with 7B parameters
10
 
11
+ ## Folder Structure
12
+
13
+ masx-openchat-llm/
14
+ β”œβ”€β”€ app.py # FastAPI entrypoint
15
+ β”œβ”€β”€ model_loader.py # Load model only once (OpenChat/Mistral)
16
+ β”œβ”€β”€ requirements.txt # Only include inference packages
17
+ β”œβ”€β”€ Dockerfile # Used automatically by HF
18
+ β”œβ”€β”€ env.example # Environment variables template
19
+ └── README.md # Endpoint doc & HF Space link
20
+
21
+
22
  ## Quick Start
23
 
24
  ### Requirements