Upload 2 files
Browse files- Dockerfile +14 -26
- README.md +11 -0
Dockerfile
CHANGED
|
@@ -1,35 +1,23 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
#
|
| 6 |
-
|
| 7 |
-
libnss3 \
|
| 8 |
-
libnspr4 \
|
| 9 |
-
libatk1.0-0 \
|
| 10 |
-
libatk-bridge2.0-0 \
|
| 11 |
-
libcups2 \
|
| 12 |
-
libdrm2 \
|
| 13 |
-
libxkbcommon0 \
|
| 14 |
-
libxcomposite1 \
|
| 15 |
-
libxdamage1 \
|
| 16 |
-
libxfixes3 \
|
| 17 |
-
libxrandr2 \
|
| 18 |
-
libgbm1 \
|
| 19 |
-
libasound2 \
|
| 20 |
-
libpango-1.0-0 \
|
| 21 |
-
libcairo2 \
|
| 22 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 23 |
|
| 24 |
-
#
|
| 25 |
-
COPY requirements.txt .
|
| 26 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 27 |
|
| 28 |
-
#
|
| 29 |
-
RUN playwright install
|
| 30 |
|
| 31 |
-
|
|
|
|
| 32 |
|
| 33 |
-
|
|
|
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
| 1 |
+
# Use an official Python runtime as a parent image
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy the current directory contents into the container at /app
|
| 8 |
+
COPY . /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
# Install any needed packages specified in requirements.txt
|
|
|
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Install Playwright browsers
|
| 14 |
+
RUN playwright install --with-deps
|
| 15 |
|
| 16 |
+
# Make port 7860 available to the world outside this container
|
| 17 |
+
EXPOSE 7860
|
| 18 |
|
| 19 |
+
# Define environment variable
|
| 20 |
+
ENV PORT=7860
|
| 21 |
|
| 22 |
+
# Run app.py when the container launches
|
| 23 |
+
CMD ["python", "app.py"]
|
README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Flow2API
|
| 2 |
|
| 3 |
<div align="center">
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Flow2API
|
| 3 |
+
emoji: 🚀
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: docker
|
| 7 |
+
sdk_version: '1.0'
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
# Flow2API
|
| 13 |
|
| 14 |
<div align="center">
|