Label-studio: One click deploy fails - Heroku and Cloud Shell

Created on 29 Feb 2020  Â·  3Comments  Â·  Source: heartexlabs/label-studio

Bug description

One click deploy fails with heroku and G-Cloud. Nb: did not try Azure

To Reproduce

From , click on "Deploy to heroku" (resp "Run on Google Cloud")

Heroku

The app seems to deploy properly, but trying to view the app raises an error. See log below

Build succeeded
2020-02-29T20:27:03.059519+00:00 heroku[web.1]: Starting process with command `/bin/sh -c /app/scripts/run-demo.sh\ image_bbox`
2020-02-29T20:27:04.653656+00:00 heroku[web.1]: State changed from starting to crashed
2020-02-29T20:27:04.658164+00:00 heroku[web.1]: State changed from crashed to starting
2020-02-29T20:27:04.587835+00:00 app[web.1]: /bin/sh: 1: /app/scripts/run-demo.sh: not found
2020-02-29T20:27:04.635743+00:00 heroku[web.1]: Process exited with status 127
2020-02-29T20:27:11.866396+00:00 heroku[web.1]: Starting process with command `/bin/sh -c /app/scripts/run-demo.sh\ image_bbox`
2020-02-29T20:27:13.677675+00:00 heroku[web.1]: State changed from starting to crashed
2020-02-29T20:27:13.612127+00:00 app[web.1]: /bin/sh: 1: /app/scripts/run-demo.sh: not found
2020-02-29T20:27:13.657675+00:00 heroku[web.1]: Process exited with status 127
2020-02-29T20:27:15.080616+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=label-studio-test.herokuapp.com request_id=f87f49a8-be55-40ce-b3cc-3fd85f155c3f fwd="91.163.191.60" dyno= connect= service= status=503 bytes= protocol=https
2020-02-29T20:27:16.584977+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=label-studio-test.herokuapp.com request_id=37a1c9d7-a97a-425a-ab04-6643fa7c225b fwd="91.163.191.60" dyno= connect= service= status=503 bytes= protocol=https

G Cloud

Fails parsing app.json

cloudshell_open --repo_url "https://github.com/heartexlabs/label-studio.git" --page "editor"
[ ✓ ] Cloned git repository https://github.com/heartexlabs/label-studio.git.
Error: error attempting to read the app.json from the cloned repository: failed to parse app.json file: failed to parse a
pp.json: json: unknown field "success_url"

bug

Most helpful comment

A fix that worked for me on gcloud is removing the app.json and changing a few lines in the docker file. It's mainly about using the default port of google cloud run (port 8080) and not auto-starting a browser. If you like I can write a pull request?

# Building the main container
FROM python:3.6-slim
WORKDIR /label-studio
# Copy and install requirements.txt first for caching
COPY requirements.txt /label-studio
RUN pip install -r requirements.txt
ENV PORT="8080"
ENV collect_analytics=0
EXPOSE ${PORT}
COPY . /label-studio
RUN pip install -e .
CMD ["label-studio", "start", "my_project", "--init", "--no-browser", "--port", "8080"]

All 3 comments

A fix that worked for me on gcloud is removing the app.json and changing a few lines in the docker file. It's mainly about using the default port of google cloud run (port 8080) and not auto-starting a browser. If you like I can write a pull request?

# Building the main container
FROM python:3.6-slim
WORKDIR /label-studio
# Copy and install requirements.txt first for caching
COPY requirements.txt /label-studio
RUN pip install -r requirements.txt
ENV PORT="8080"
ENV collect_analytics=0
EXPOSE ${PORT}
COPY . /label-studio
RUN pip install -e .
CMD ["label-studio", "start", "my_project", "--init", "--no-browser", "--port", "8080"]

Hi, @iCorv ! Thank's for fixing this, sure, making PR is a great idea!

Hi @niklub, if possible, please review my pull request linked to this issue -> https://github.com/heartexlabs/label-studio/pull/243

Was this page helpful?
0 / 5 - 0 ratings

Related issues

laynr picture laynr  Â·  4Comments

dalekube picture dalekube  Â·  5Comments

Rishabh-hyperverge picture Rishabh-hyperverge  Â·  3Comments

makseq picture makseq  Â·  6Comments

kasuteru picture kasuteru  Â·  3Comments