Create Dockerfile
Browse files- Dockerfile +56 -0
Dockerfile
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Base image
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
+
|
| 4 |
+
# Set environment variables
|
| 5 |
+
ENV PYTHONDONTWRITEBYTECODE=1
|
| 6 |
+
ENV PYTHONUNBUFFERED=1
|
| 7 |
+
ENV PORT=7860
|
| 8 |
+
|
| 9 |
+
# Set working directory
|
| 10 |
+
WORKDIR /app
|
| 11 |
+
|
| 12 |
+
# Install system dependencies
|
| 13 |
+
RUN apt-get update && apt-get install -y \
|
| 14 |
+
git \
|
| 15 |
+
curl \
|
| 16 |
+
gnupg \
|
| 17 |
+
unzip \
|
| 18 |
+
nodejs \
|
| 19 |
+
npm \
|
| 20 |
+
supervisor \
|
| 21 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 22 |
+
|
| 23 |
+
# Install bun
|
| 24 |
+
RUN npm install -g bun
|
| 25 |
+
|
| 26 |
+
# Install uv (Python package manager)
|
| 27 |
+
RUN curl -Ls https://astral.sh/uv/install.sh | bash
|
| 28 |
+
|
| 29 |
+
# Clone Devika repository
|
| 30 |
+
RUN git clone https://github.com/stitionai/devika.git ./
|
| 31 |
+
|
| 32 |
+
# Set up virtual environment
|
| 33 |
+
RUN uv venv
|
| 34 |
+
ENV PATH="/app/.venv/bin:$PATH"
|
| 35 |
+
|
| 36 |
+
# Install Python dependencies
|
| 37 |
+
RUN uv pip install -r requirements.txt
|
| 38 |
+
|
| 39 |
+
# Install Playwright dependencies and browsers
|
| 40 |
+
RUN .venv/bin/playwright install --with-deps
|
| 41 |
+
|
| 42 |
+
# Install frontend dependencies
|
| 43 |
+
WORKDIR /app/ui
|
| 44 |
+
RUN bun install
|
| 45 |
+
|
| 46 |
+
# Return to root directory
|
| 47 |
+
WORKDIR /app
|
| 48 |
+
|
| 49 |
+
# Copy supervisord configuration
|
| 50 |
+
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
| 51 |
+
|
| 52 |
+
# Expose frontend port
|
| 53 |
+
EXPOSE 7860
|
| 54 |
+
|
| 55 |
+
# Start supervisord
|
| 56 |
+
CMD ["/usr/bin/supervisord"]
|