Update Dockerfile
Browse files- Dockerfile +14 -17
Dockerfile
CHANGED
|
@@ -1,25 +1,22 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
# Install system dependencies
|
| 4 |
-
RUN apt-get update &&
|
| 5 |
-
espeak \
|
| 6 |
-
|
| 7 |
-
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
-
# Set
|
| 10 |
-
RUN useradd -m -u 1000 user
|
| 11 |
-
USER user
|
| 12 |
WORKDIR /app
|
| 13 |
-
ENV PATH="/home/user/.local/bin:${PATH}"
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
COPY
|
| 17 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
|
| 21 |
|
|
|
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
-
#
|
| 25 |
-
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
# Base image with Python and essential libraries
|
| 2 |
+
FROM python:3.8-slim
|
| 3 |
|
| 4 |
+
# Install system-level dependencies
|
| 5 |
+
RUN apt-get update && \
|
| 6 |
+
apt-get install -y espeak && \
|
| 7 |
+
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
| 8 |
|
| 9 |
+
# Set the working directory
|
|
|
|
|
|
|
| 10 |
WORKDIR /app
|
|
|
|
| 11 |
|
| 12 |
+
# Copy your files into the container
|
| 13 |
+
COPY . .
|
|
|
|
| 14 |
|
| 15 |
+
# Install Python dependencies
|
| 16 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
+
# Expose the port
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
+
# Run your app
|
| 22 |
+
CMD ["python", "app.py"]
|