forked from etrobot/open-alpha-arena
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (29 loc) · 897 Bytes
/
Dockerfile
File metadata and controls
44 lines (29 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM node:20-alpine AS frontend-build
WORKDIR /app
# Install pnpm globally
RUN npm install -g pnpm
# Copy frontend source code
COPY frontend/ .
# Install frontend dependencies and build
RUN pnpm install && pnpm run build
# Backend build
FROM python:3.13-slim
RUN pip install uv
WORKDIR /app
# Copy backend files
COPY backend/ ./
# Copy frontend build to backend static directory
COPY --from=frontend-build /app/dist ./static
# Create __init__.py files for all directories containing Python files
RUN find . -name "*.py" -exec dirname {} \; | xargs -I {} touch {}/__init__.py
# Install dependencies using uv
RUN uv sync --frozen
# Activate virtual environment
ENV VIRTUAL_ENV=/app/.venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ENV PYTHONPATH=/app
# Expose port
EXPOSE 5611
# Start the application
WORKDIR /app
CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5611"]