Update Dockerfile
Browse files- Dockerfile +5 -6
Dockerfile
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
# Use Python base image
|
2 |
FROM python:3.12.2
|
3 |
|
|
|
|
|
|
|
|
|
|
|
4 |
# Prevent timezone prompt during package installation
|
5 |
ENV DEBIAN_FRONTEND=noninteractive
|
6 |
ENV TZ=UTC
|
@@ -32,12 +37,6 @@ RUN pip install --no-cache-dir setuptools-rust
|
|
32 |
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
33 |
RUN pip install --no-cache-dir -r requirements.txt
|
34 |
|
35 |
-
# Create and switch to a non-root user
|
36 |
-
RUN useradd -m -u 1000 user
|
37 |
-
USER user
|
38 |
-
|
39 |
-
# Ensure ownership of /app directory
|
40 |
-
COPY --chown=user . /app/
|
41 |
|
42 |
# Environment variables for PyTorch and Whisper
|
43 |
ENV TORCH_DEVICE="cuda"
|
|
|
1 |
# Use Python base image
|
2 |
FROM python:3.12.2
|
3 |
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
USER user
|
6 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
7 |
+
COPY --chown=user . /app/
|
8 |
+
|
9 |
# Prevent timezone prompt during package installation
|
10 |
ENV DEBIAN_FRONTEND=noninteractive
|
11 |
ENV TZ=UTC
|
|
|
37 |
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
38 |
RUN pip install --no-cache-dir -r requirements.txt
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
# Environment variables for PyTorch and Whisper
|
42 |
ENV TORCH_DEVICE="cuda"
|