Create Dockerfile
Browse files- Dockerfile +27 -0
Dockerfile
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Hugging Face Spaces Docker SDK
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
+
|
| 4 |
+
# Create non-root user
|
| 5 |
+
RUN useradd -m -u 1000 user
|
| 6 |
+
USER user
|
| 7 |
+
|
| 8 |
+
# Set PATH for uv
|
| 9 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
| 10 |
+
|
| 11 |
+
# Set working directory
|
| 12 |
+
WORKDIR /app
|
| 13 |
+
|
| 14 |
+
# Install uv
|
| 15 |
+
RUN pip install --no-cache-dir uv
|
| 16 |
+
|
| 17 |
+
# Copy dependency files first (better caching)
|
| 18 |
+
COPY --chown=user pyproject.toml uv.lock* ./
|
| 19 |
+
|
| 20 |
+
# Sync dependencies
|
| 21 |
+
RUN uv sync
|
| 22 |
+
|
| 23 |
+
# Copy the rest of the app
|
| 24 |
+
COPY --chown=user . .
|
| 25 |
+
|
| 26 |
+
# Run your bot
|
| 27 |
+
CMD ["uv", "run", "bot.py", "--transport", "exotel", "--proxy", "your_huggingface_proxy"]
|