Spaces:
Build error
Build error
Merge pull request #9 from nicolabeghin/docker-support
Browse files- .dockerignore +15 -0
- Dockerfile +8 -0
- docker-compose.yml +11 -0
.dockerignore
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.git
|
| 2 |
+
__pycache__
|
| 3 |
+
*.pyc
|
| 4 |
+
*.pyo
|
| 5 |
+
.pytest_cache
|
| 6 |
+
.coverage
|
| 7 |
+
.mypy_cache
|
| 8 |
+
.ruff_cache
|
| 9 |
+
tests/
|
| 10 |
+
docs/
|
| 11 |
+
CHANGELOG.md
|
| 12 |
+
LICENSE
|
| 13 |
+
NOTICE
|
| 14 |
+
.env
|
| 15 |
+
*.log
|
Dockerfile
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
| 3 |
+
COPY . /app
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
RUN pip install -e .[proxy]
|
| 6 |
+
EXPOSE 8787
|
| 7 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD curl -f http://localhost:8787/health || exit 1
|
| 8 |
+
ENTRYPOINT ["headroom", "proxy"]
|
docker-compose.yml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
headroom-proxy:
|
| 3 |
+
build: .
|
| 4 |
+
command: ["--host", "0.0.0.0"]
|
| 5 |
+
environment:
|
| 6 |
+
- HEADROOM_HOST=0.0.0.0
|
| 7 |
+
# if you want to use a custom OpenAI-compatible API endpoint,
|
| 8 |
+
# uncomment and set the following line with the desired URL
|
| 9 |
+
# - OPENAI_TARGET_API_URL=https://api.x.ai
|
| 10 |
+
ports:
|
| 11 |
+
- "8787:8787"
|