Spaces:
Runtime error
Runtime error
Create Optional Dockerfile
Browse files- Dockerfile +42 -0
Dockerfile
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:20.04
|
| 2 |
+
|
| 3 |
+
# Install system dependencies
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
python3-pip \
|
| 6 |
+
python3 \
|
| 7 |
+
libnss3 \
|
| 8 |
+
libnspr4 \
|
| 9 |
+
libsmime3 \
|
| 10 |
+
libatk1.0-0 \
|
| 11 |
+
libatk-bridge2.0-0 \
|
| 12 |
+
libgtk-3-0 \
|
| 13 |
+
libasound2 \
|
| 14 |
+
libx11-xcb1 \
|
| 15 |
+
libxcb-dri3-0 \
|
| 16 |
+
libxdamage1 \
|
| 17 |
+
libxext6 \
|
| 18 |
+
libxfixes3 \
|
| 19 |
+
libxrandr2 \
|
| 20 |
+
libxrender1 \
|
| 21 |
+
libxcursor1 \
|
| 22 |
+
libxss1 \
|
| 23 |
+
libxtst6 \
|
| 24 |
+
libdbus-1-3 \
|
| 25 |
+
libatspi2.0-0 \
|
| 26 |
+
libdrm2 \
|
| 27 |
+
libgbm1 \
|
| 28 |
+
libxcomposite1 \
|
| 29 |
+
libxinerama1 && \
|
| 30 |
+
rm -rf /var/lib/apt/lists/*
|
| 31 |
+
|
| 32 |
+
# Copy requirements and install Python packages
|
| 33 |
+
COPY requirements.txt /app/requirements.txt
|
| 34 |
+
WORKDIR /app
|
| 35 |
+
RUN pip3 install --upgrade pip
|
| 36 |
+
RUN pip3 install -r requirements.txt
|
| 37 |
+
|
| 38 |
+
# Copy app code
|
| 39 |
+
COPY . /app
|
| 40 |
+
|
| 41 |
+
# Run the app
|
| 42 |
+
CMD ["bash", "install_dependencies.sh", "&&", "python3", "app.py"]
|