Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile / Docker image #13

Open
alexanderadam opened this issue May 27, 2019 · 6 comments
Open

Dockerfile / Docker image #13

alexanderadam opened this issue May 27, 2019 · 6 comments

Comments

@alexanderadam
Copy link

It would be nice to have setup & dependencies available via Docker.

@artyshko artyshko pinned this issue May 27, 2019
@aledv
Copy link

aledv commented Jun 21, 2019

I guess thath is necessary Flask for use this project with a container

@alexanderadam
Copy link
Author

@aledv can you explain why should it require Flask? 🤔

IMHO for the no change should be necessary (except from adding a Dockerfile of course).
After the image is available it should be possible to run it with something like

$ docker run smd -s spotify:track:7ARveOiD31w2Nq0n5FsSf8 -v ./downloads:/downloads

instead of

$ ./main.py -s spotify:track:7ARveOiD31w2Nq0n5FsSf8

@aledv
Copy link

aledv commented Jun 23, 2019

Ok, you have to run the container everytime... Whit flask you can leave the container always run and pass the parameters when you need a new request.

Sorry for my english

@alexanderadam
Copy link
Author

alexanderadam commented Jun 23, 2019

I still don't see why flask is needed.
A Docker process can be long and short running. Depending on what you need.
If you need Docker for a server process, it will probably be a long running daemon and if you need just a short running CLI then it will just be a short running process.

This is why I don't think what you describes is related to Docker. Right now flask is IMHO not needed because smd is simply started when needed, right?
Using smd via webinterface could be a feature for some people but I don't see why it should be related to Docker.
Or do I miss something here?

@prokopiff
Copy link

I second this. The project has a lot of dependencies. I'm not a python developer and I don't know how to troubleshoot various python dependency issues. Dockerfile would ensure this works for anyone.

FROM python:3.8.0-buster

WORKDIR /app
RUN git clone https://github.com/artyshko/smd.git

WORKDIR /app/smd

RUN apt-get update
RUN apt-get install -y python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev   libsdl1.2-dev libsmpeg-dev python-numpy subversion libportmidi-dev ffmpeg libswscale-dev libavformat-dev libavcodec-dev
RUN pip3 install -r requirements.txt
RUN printf "import imageio\nimageio.plugins.ffmpeg.download()" > dl.py && python3 dl.py && rm dl.py
#RUN pip3 install PyQtWebEngine
#RUN apt-get install -y python3-pyqt5.qtwebengine 

CMD python3 main.py

If feel like this is close, but still it doesn't work. Can someone help?

@miraclx
Copy link

miraclx commented Jan 4, 2021

Check out freyr..https://github.com/miraclx/freyr-js

See #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants