-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerFile.cuda
More file actions
52 lines (45 loc) · 1.47 KB
/
Copy pathDockerFile.cuda
File metadata and controls
52 lines (45 loc) · 1.47 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
43
44
45
46
47
48
49
50
51
52
# ----------------------------------------
# NVIDIA CUDA Base Image (Inference Ready)
# ----------------------------------------
FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04
# ----------------------------------------
# Environment Variables
# ----------------------------------------
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
# ----------------------------------------
# System Dependencies
# ----------------------------------------
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-dev \
build-essential \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# ----------------------------------------
# Working Directory
# ----------------------------------------
WORKDIR /app
# ----------------------------------------
# Python Dependencies
# ----------------------------------------
COPY requirements.txt .
RUN pip3 install --no-cache-dir --upgrade pip \
&& pip3 install --no-cache-dir -r requirements.txt
# ----------------------------------------
# Copy Application Code
# ----------------------------------------
COPY . .
# ----------------------------------------
# Expose Port
# ----------------------------------------
EXPOSE 10000
# ----------------------------------------
# Start FastAPI App
# ----------------------------------------
CMD ["uvicorn", "backend.api:app", "--host", "0.0.0.0", "--port", "10000"]