-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 822 Bytes
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 822 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
# Test Dockerfile with all runtime dependencies
# Apple M1 compatible multi-platform image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
USER root
# Install system dependencies including CA certificates
RUN apt-get update && apt-get install -y \
git \
curl \
build-essential \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& update-ca-certificates
# Install uv for fast dependency management
RUN pip install uv
# Copy project files
COPY pyproject.toml uv.lock README.md ./
# Configure UV for better SSL handling
ENV UV_NATIVE_TLS=1
RUN uv sync --all-extras --frozen --all-groups --no-group torchexamples
COPY runnable/ ./runnable/
COPY extensions/ ./extensions/
COPY examples/ ./examples/
# Set environment variables
ENV PYTHONPATH=/app
ENV PATH="/app/.venv/bin:$PATH"