dn-scribe commited on
Commit
91fdf5a
·
unverified ·
1 Parent(s): 01d46cd

Dockerizing

Browse files
.github/workflows/push2hf.yml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Space
2
+
3
+ on:
4
+ # push:
5
+ # branches: [main]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ sync:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ with:
14
+ fetch-depth: 0
15
+ lfs: true
16
+
17
+ - name: Push to Space
18
+ env:
19
+ HF_TOKEN: ${{ secrets.HUGGINGFACE_API_KEY }}
20
+ run: |
21
+ git push https://dn-scrib:$HF_TOKEN@huggingface.co/spaces/dn-scribe/scribe-mcp main --force
.vscode/mcp.json CHANGED
@@ -1,9 +1,9 @@
1
  {
2
  "servers": {
3
- "ScribeMCPHuggingFace": {
4
- "url": "https://eporath-scribe-mcp.hf.space/mcp",
5
- "type": "sse"
6
- },
7
  "ScribeMCPLocal": {
8
  "url": "http://127.0.0.1:8000/mcp",
9
  "type": "sse"
 
1
  {
2
  "servers": {
3
+ // "ScribeMCPHuggingFace": {
4
+ // "url": "https://eporath-scribe-mcp.hf.space/mcp",
5
+ // "type": "sse"
6
+ // },
7
  "ScribeMCPLocal": {
8
  "url": "http://127.0.0.1:8000/mcp",
9
  "type": "sse"
Dockerfile CHANGED
@@ -2,15 +2,15 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- COPY requirements.txt .
6
- RUN pip install --no-cache-dir -r requirements.txt
7
-
8
  COPY . .
9
 
 
 
 
10
  ENV PYTHONPATH=/app
11
 
12
  RUN mkdir -p /app/tmp && chmod -R 777 /app/tmp
13
 
14
- EXPOSE 7860
15
 
16
- CMD ["python", "-m", "uvicorn", "scribe_python_client.mcp_app.app:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
 
 
 
5
  COPY . .
6
 
7
+ # RUN pip install 'scribe-python-client[all]'
8
+ RUN pip install --no-cache-dir -e '.[all]'
9
+
10
  ENV PYTHONPATH=/app
11
 
12
  RUN mkdir -p /app/tmp && chmod -R 777 /app/tmp
13
 
14
+ EXPOSE 8000
15
 
16
+ CMD ["scribe-client", "--mcp", "--api-token", "$SCRIBE_TOKEN"]
scribe_python_client/mcp_app/main.py CHANGED
@@ -15,4 +15,4 @@ def run_mcp_server():
15
  mcp.mount()
16
  mcp.setup_server()
17
  import uvicorn
18
- uvicorn.run(app, host="127.0.0.1", port=8000)
 
15
  mcp.mount()
16
  mcp.setup_server()
17
  import uvicorn
18
+ uvicorn.run(app, host="0.0.0.0", port=8000)