-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 968 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 968 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
FROM pytorch/pytorch:2.4.1-cuda11.8-cudnn9-devel
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
# Set working directory
WORKDIR /app
# Install basic packages
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements.txt
COPY requirements.txt .
# Install the packages
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Install the packages using Tencent Cloud mirror
# RUN pip install --no-cache-dir -i https://mirrors.cloud.tencent.com/pypi/simple/ --trusted-host mirrors.cloud.tencent.com --upgrade pip && \
# pip install --no-cache-dir -i https://mirrors.cloud.tencent.com/pypi/simple/ --trusted-host mirrors.cloud.tencent.com -r requirements.txt
# Set an entrypoint that drops you into a shell
ENTRYPOINT ["/bin/bash"]