-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.concurrent_gary
56 lines (42 loc) · 1.68 KB
/
Dockerfile.concurrent_gary
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
53
54
55
56
# Use a CUDA-enabled base image with Ubuntu 20.04
FROM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04
# Set the working directory
WORKDIR /usr/src/app
# Install necessary packages including Python 3.9 and pip
RUN apt-get update && apt-get install -y \
software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update && apt-get install -y \
python3.9 \
python3.9-distutils \
wget \
git \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
ffmpeg \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
# Install pip for Python 3.9
RUN wget https://bootstrap.pypa.io/get-pip.py && python3.9 get-pip.py && rm get-pip.py
# Install setuptools and wheel
RUN python3.9 -m pip install --upgrade pip
RUN python3.9 -m pip install setuptools wheel
# Install numpy using a later version (or try with 1.24.0)
RUN python3.9 -m pip install numpy==1.24.0 --prefer-binary
# Copy the requirements file into the container
COPY requirements-concurrent_gary.txt ./
# Install Python dependencies
RUN python3.9 -m pip install --no-cache-dir -r requirements-concurrent_gary.txt
RUN python3.9 -m pip install numpy==1.24.0 --prefer-binary
# Verify gunicorn installation and list installed packages
RUN python3.9 -m pip show gunicorn
RUN python3.9 -m pip list
# Copy the entire application folder
COPY . .
# Copy entrypoint.sh and make it executable
COPY concurrent_gary-entrypoint.sh /usr/src/app/concurrent_gary-entrypoint.sh
RUN chmod +x /usr/src/app/concurrent_gary-entrypoint.sh
# Make port 8001 available to the world outside this container
EXPOSE 8001
# Use the entrypoint.sh script
ENTRYPOINT ["/usr/src/app/concurrent_gary-entrypoint.sh"]