-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (33 loc) · 1.08 KB
/
Dockerfile
File metadata and controls
42 lines (33 loc) · 1.08 KB
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
# Multi-stage Dockerfile for Open-Tinker
FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04 AS base
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
DEBIAN_FRONTEND=noninteractive
# Install system dependencies and Python 3.12 via deadsnakes PPA
RUN apt-get update && apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt-get update && apt-get install -y \
python3.12 \
python3.12-dev \
python3.12-venv \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Install uv package manager
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
# Set working directory
WORKDIR /app
# Copy project files
COPY pyproject.toml ./
COPY src/ ./src/
# Install dependencies
RUN uv sync --no-dev
# Create necessary directories
RUN mkdir -p /app/checkpoints /app/models_cache
# Expose port
EXPOSE 8000
# Default command (can be overridden in docker-compose)
CMD ["uv", "run", "uvicorn", "open_tinker.main:app", "--host", "0.0.0.0", "--port", "8000"]