pseudotheos
commited on
Commit
•
ca26ae2
1
Parent(s):
fb474b1
Update Dockerfile
Browse files- Dockerfile +7 -3
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# Use NVIDIA CUDA image as the parent image
|
2 |
-
FROM nvidia/cuda:
|
3 |
|
4 |
# Set the working directory inside the container
|
5 |
WORKDIR /app
|
@@ -7,6 +7,9 @@ WORKDIR /app
|
|
7 |
# Create a non-root user
|
8 |
RUN useradd -m appuser
|
9 |
|
|
|
|
|
|
|
10 |
# Copy the requirements file into the container at /app
|
11 |
COPY ./requirements.txt /app/
|
12 |
|
@@ -16,8 +19,9 @@ RUN chown -R appuser /app
|
|
16 |
# Switch to the non-root user
|
17 |
USER appuser
|
18 |
|
19 |
-
# Install dependencies and add necessary directories to PATH
|
20 |
-
RUN pip install --user -
|
|
|
21 |
|
22 |
# Add necessary directories to PATH
|
23 |
ENV PATH="/home/appuser/.local/bin:${PATH}"
|
|
|
1 |
# Use NVIDIA CUDA image as the parent image
|
2 |
+
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
|
3 |
|
4 |
# Set the working directory inside the container
|
5 |
WORKDIR /app
|
|
|
7 |
# Create a non-root user
|
8 |
RUN useradd -m appuser
|
9 |
|
10 |
+
# Install system dependencies
|
11 |
+
RUN apt-get update && apt-get install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg
|
12 |
+
|
13 |
# Copy the requirements file into the container at /app
|
14 |
COPY ./requirements.txt /app/
|
15 |
|
|
|
19 |
# Switch to the non-root user
|
20 |
USER appuser
|
21 |
|
22 |
+
# Install Python dependencies and add necessary directories to PATH
|
23 |
+
RUN python3 -m pip install --user --no-cache-dir --upgrade pip && \
|
24 |
+
python3 -m pip install --user --no-cache-dir -r requirements.txt uvicorn
|
25 |
|
26 |
# Add necessary directories to PATH
|
27 |
ENV PATH="/home/appuser/.local/bin:${PATH}"
|