-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdockerfile
More file actions
24 lines (18 loc) · 700 Bytes
/
Copy pathdockerfile
File metadata and controls
24 lines (18 loc) · 700 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
FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
# Define diretório de trabalho
WORKDIR /app
# Instala Python e dependências básicas
RUN apt-get update && apt-get install -y \
python3.10 python3.10-venv python3-pip \
libglib2.0-0 libsm6 libxext6 libxrender-dev libgl1 \
&& rm -rf /var/lib/apt/lists/*
# Define aliases
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
# Copia o projeto
COPY . .
# Instala dependências Python
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Comando de inicialização
CMD ["python", "app.py"]