Spaces:
Running
Running
johnbradley
commited on
Commit
•
f1783b5
1
Parent(s):
aa18684
deploy-1.1.1 (#2)
Browse files- Deploy Andromeda 1.1.1 (0be08fe6ff0d403e1d6788a40cdd5f1066000e4f)
- .gitmodules +0 -3
- Andromeda +0 -1
- Dockerfile +1 -24
- app.py +0 -14
.gitmodules
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
[submodule "Andromeda"]
|
2 |
-
path = Andromeda
|
3 |
-
url = https://github.com/Imageomics/Andromeda
|
|
|
|
|
|
|
|
Andromeda
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
Subproject commit b3ec75c0f0022e3054547d94b4dc72a360b707c9
|
|
|
|
Dockerfile
CHANGED
@@ -1,24 +1 @@
|
|
1 |
-
FROM
|
2 |
-
WORKDIR /src
|
3 |
-
COPY ./Andromeda/andromeda-ui/package.json ./
|
4 |
-
RUN npm install
|
5 |
-
COPY ./Andromeda/andromeda-ui/. .
|
6 |
-
RUN npm run build
|
7 |
-
|
8 |
-
FROM python:3.11
|
9 |
-
|
10 |
-
COPY ./Andromeda/andromeda/requirements.txt /tmp/requirements.txt
|
11 |
-
WORKDIR /tmp
|
12 |
-
RUN pip3 install gunicorn && pip3 install -r requirements.txt
|
13 |
-
|
14 |
-
COPY ./Andromeda/andromeda/. /api
|
15 |
-
COPY ./app.py /api/app.py
|
16 |
-
COPY --from=builder /src/out /api/static
|
17 |
-
WORKDIR /api
|
18 |
-
|
19 |
-
# fix since root home directory is read only in HF
|
20 |
-
RUN mkdir /tmp/home
|
21 |
-
RUN chmod a+w /tmp/home
|
22 |
-
ENV XDG_DATA_HOME=/tmp/home
|
23 |
-
|
24 |
-
CMD python app.py
|
|
|
1 |
+
FROM ghcr.io/imageomics/andromeda:1.1.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.py
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
# Adds logic to serve static html for running within huggingface
|
2 |
-
from flask import send_from_directory, request
|
3 |
-
from main import app
|
4 |
-
|
5 |
-
@app.errorhandler(404)
|
6 |
-
def page_not_found(e):
|
7 |
-
path = request.path.lstrip('/')
|
8 |
-
if path == '':
|
9 |
-
path = 'index.html'
|
10 |
-
print(path)
|
11 |
-
return send_from_directory('static', path)
|
12 |
-
|
13 |
-
if __name__ == '__main__':
|
14 |
-
app.run(host="0.0.0.0", port=7860)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|