forked from buerokratt/Dataset-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 829 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (27 loc) · 829 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
FROM python:3.12-slim
RUN apt-get update && apt-get install -y \
curl \
build-essential \
g++ \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
WORKDIR /app
# Install dependencies
COPY pyproject.toml .
COPY uv.lock .
RUN uv sync --locked
# Copy application code
COPY src/ /app/src/
COPY templates/ /app/templates/
# Copy default configurations
COPY config/ /app/config/
# Create necessary directories
RUN mkdir -p /app/user_configs /app/data /app/output_datasets /app/logs
RUN chmod -R 755 /app/user_configs /app/data /app/output_datasets /app/logs
# Set environment variables
ENV PYTHONPATH=/app
ENV SERVICE_HOST=0.0.0.0
ENV SERVICE_PORT=8000
# Run application
CMD ["uv", "run", "python", "src/main.py", "--host", "0.0.0.0", "--port", "8000"]