Jacob Logas commited on
remove dockerfile
Browse files- .dockerignore +0 -3
- .pre-commit-config.yaml +16 -0
- Dockerfile +0 -23
- requirements-dev.txt +2 -0
.dockerignore
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
/venv
|
| 2 |
-
/flagged
|
| 3 |
-
/.env
|
|
|
|
|
|
|
|
|
|
|
|
.pre-commit-config.yaml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
repos:
|
| 2 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
| 3 |
+
rev: v2.3.0
|
| 4 |
+
hooks:
|
| 5 |
+
- id: check-yaml
|
| 6 |
+
- id: end-of-file-fixer
|
| 7 |
+
- id: trailing-whitespace
|
| 8 |
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
| 9 |
+
# Ruff version.
|
| 10 |
+
rev: v0.5.2
|
| 11 |
+
hooks:
|
| 12 |
+
# Run the linter.
|
| 13 |
+
- id: ruff
|
| 14 |
+
args: [ --fix ]
|
| 15 |
+
# Run the formatter.
|
| 16 |
+
- id: ruff-format
|
Dockerfile
DELETED
|
@@ -1,23 +0,0 @@
|
|
| 1 |
-
FROM python:3.11-slim as builder
|
| 2 |
-
|
| 3 |
-
RUN apt update && \
|
| 4 |
-
apt install --no-install-recommends -y build-essential gcc git
|
| 5 |
-
|
| 6 |
-
COPY requirements.txt /requirements.txt
|
| 7 |
-
|
| 8 |
-
RUN python -m pip install --upgrade pip && \
|
| 9 |
-
pip install --no-cache-dir --no-warn-script-location --user -r requirements.txt
|
| 10 |
-
|
| 11 |
-
# Stage 2: Runtime
|
| 12 |
-
FROM tensorflow/tensorflow:2.13.0-gpu
|
| 13 |
-
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 14 |
-
ENV TZ=America/New_York
|
| 15 |
-
|
| 16 |
-
RUN apt update && \
|
| 17 |
-
apt install --no-install-recommends -y libgl1-mesa-glx && \
|
| 18 |
-
apt clean && rm -rf /var/lib/apt/lists/*
|
| 19 |
-
COPY --from=builder /root/.local/lib/python3.11/site-packages /usr/local/lib/python3.11/dist-packages
|
| 20 |
-
COPY app.py app.py
|
| 21 |
-
|
| 22 |
-
CMD ["python3", "-u", "app.py"]
|
| 23 |
-
EXPOSE 7860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements-dev.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ruff
|
| 2 |
+
pre-commit
|