Update Dockerfile
Browse files- Dockerfile +15 -9
Dockerfile
CHANGED
@@ -1,21 +1,28 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
WORKDIR /app
|
5 |
|
6 |
-
# Copy the requirements file
|
7 |
COPY ./requirements.txt /app/requirements.txt
|
8 |
-
|
9 |
-
|
10 |
-
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
11 |
-
RUN apt update && apt install -y ffmpeg
|
12 |
|
13 |
# Add and configure the user
|
14 |
RUN useradd -m -u 1000 user
|
15 |
|
16 |
# Set environment variables for the user
|
17 |
ENV HOME=/home/user \
|
18 |
-
PATH=/home/user/.local/bin:$PATH
|
|
|
19 |
|
20 |
# Set the user and working directory
|
21 |
USER user
|
@@ -30,7 +37,6 @@ RUN chmod -R 777 $HOME/app
|
|
30 |
# Set additional environment variables
|
31 |
ENV NUMBA_CACHE_DIR=/tmp/NUMBA_CACHE_DIR/
|
32 |
ENV MPLCONFIGDIR=/tmp/MPLCONFIGDIR/
|
33 |
-
ENV HOME=/home/user
|
34 |
ENV PATH="/opt/venv/bin:$PATH"
|
35 |
|
36 |
# Set the command to run the application
|
|
|
1 |
+
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04
|
2 |
|
3 |
+
# Install Python and other dependencies
|
4 |
+
RUN apt-get update && apt-get install -y \
|
5 |
+
python3.10 \
|
6 |
+
python3-pip \
|
7 |
+
ffmpeg \
|
8 |
+
&& apt-get clean \
|
9 |
+
&& rm -rf /var/lib/apt/lists/*
|
10 |
+
|
11 |
+
# Set up the working directory
|
12 |
WORKDIR /app
|
13 |
|
14 |
+
# Copy the requirements file and install dependencies
|
15 |
COPY ./requirements.txt /app/requirements.txt
|
16 |
+
RUN python3 -m pip install --upgrade pip \
|
17 |
+
&& python3 -m pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
|
|
|
|
18 |
|
19 |
# Add and configure the user
|
20 |
RUN useradd -m -u 1000 user
|
21 |
|
22 |
# Set environment variables for the user
|
23 |
ENV HOME=/home/user \
|
24 |
+
PATH=/home/user/.local/bin:$PATH \
|
25 |
+
CUDA_HOME=/usr/local/cuda
|
26 |
|
27 |
# Set the user and working directory
|
28 |
USER user
|
|
|
37 |
# Set additional environment variables
|
38 |
ENV NUMBA_CACHE_DIR=/tmp/NUMBA_CACHE_DIR/
|
39 |
ENV MPLCONFIGDIR=/tmp/MPLCONFIGDIR/
|
|
|
40 |
ENV PATH="/opt/venv/bin:$PATH"
|
41 |
|
42 |
# Set the command to run the application
|