-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (35 loc) · 945 Bytes
/
Dockerfile
File metadata and controls
44 lines (35 loc) · 945 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
38
39
40
41
42
43
44
FROM pytorch/pytorch:2.2.0-cuda12.1-cudnn8-runtime
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Set Work Directory
WORKDIR /app
# Environment variables
ENV PYTHONUNBUFFERED=True
ENV DEBIAN_FRONTEND=noninteractive
ENV SHELL=/bin/bash
ENV PIP_NO_CACHE_DIR=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
# Update, upgrade, install packages and clean up
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
bash \
ca-certificates \
curl \
git \
pkg-config \
zip \
build-essential \
software-properties-common \
ffmpeg \
libsndfile1 && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip setuptools wheel && \
pip install -r requirements.txt
# Copy application code
COPY handler.py .
STOPSIGNAL SIGINT
CMD ["python", "-u", "handler.py"]