Spaces:
Sleeping
Sleeping
Upload 9 files
Browse files- Dockerfile +18 -0
- MIT-LICENSE.txt +20 -0
- Makefile +17 -0
Dockerfile
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10-slim
|
2 |
+
|
3 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
4 |
+
build-essential \
|
5 |
+
libpq-dev \
|
6 |
+
&& rm -rf /var/lib/apt/lists/*
|
7 |
+
|
8 |
+
COPY . /app
|
9 |
+
WORKDIR /app
|
10 |
+
|
11 |
+
RUN pip install -U pip
|
12 |
+
RUN pip install poetry
|
13 |
+
RUN poetry install
|
14 |
+
|
15 |
+
EXPOSE 7860
|
16 |
+
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
17 |
+
|
18 |
+
ENTRYPOINT ["poetry", "run", "python3", "main.py", "interface"]
|
MIT-LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright (c) 2024 Bruno Chicelli
|
2 |
+
|
3 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
4 |
+
a copy of this software and associated documentation files (the
|
5 |
+
"Software"), to deal in the Software without restriction, including
|
6 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
7 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8 |
+
permit persons to whom the Software is furnished to do so, subject to
|
9 |
+
the following conditions:
|
10 |
+
|
11 |
+
The above copyright notice and this permission notice shall be
|
12 |
+
included in all copies or substantial portions of the Software.
|
13 |
+
|
14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
Makefile
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
PACKAGE_NAME = img2art_search
|
2 |
+
|
3 |
+
lint:
|
4 |
+
isort ${PACKAGE_NAME}
|
5 |
+
black ${PACKAGE_NAME}
|
6 |
+
flake8 ${PACKAGE_NAME}
|
7 |
+
mypy ${PACKAGE_NAME}
|
8 |
+
viz:
|
9 |
+
poetry run python3 main.py interface
|
10 |
+
train:
|
11 |
+
poetry run python3 main.py train
|
12 |
+
wikiart:
|
13 |
+
poetry run python3 main.py gallery
|
14 |
+
build-image:
|
15 |
+
docker build -t img2art-search .
|
16 |
+
run-on-docker:
|
17 |
+
docker run --env-file .env -p 7860:7860 img2art-search
|