-
Notifications
You must be signed in to change notification settings - Fork 106
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 or docker-compose.yml - decrease starting friction #52
Comments
I am trying to make a docker image .
and here is the error: '''
|
The error message suggests that there is a syntax error in the file newQueue.js at line 34, specifically, an unexpected token '.'
The ?. syntax is called the Optional Chaining Operator and it was introduced in Node.js version 14.3.0. It looks like the version of Node.js installed in your Dockerfile might be older than 14.3.0, hence the syntax error. You can try upgrading your Node.js version to the latest stable release by changing this line:
to
This will install the latest stable version of Node.js. Alternatively, you can specify a version greater than or equal to 14.3.0 that supports the Optional Chaining Operator. Once you've made the change, rebuild your Docker image and see if the error goes away. |
stangly i see a node 16 installed :
but il the log i see version 12.22.12:
maybe somthing happend during npm start ? |
ok! found the source of the issue I test further now if it works |
Any luck with it? |
I just tested with this configuration and this works locally: FROM debian:bullseye
RUN apt update && apt install nginx git ffmpeg software-properties-common python curl python3 python3.9 python3-pip python3.9-distutils python3.9-dev pkg-config libicu-dev lsof nano -y
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1000
RUN pip3 install setuptools-rust
RUN pip3 install --upgrade setuptools
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN alias pip=pip3
RUN alias python=python3.9
RUN pip3 install --upgrade setuptools
RUN pip3 install git+https://github.com/openai/whisper.git
ENV NVM_DIR /root/.nvm
ENV NODE_VERSION 16.19.1
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
RUN . $HOME/.nvm/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION && nvm use default && npm install -g http-server pm2
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
RUN chmod a+rx /usr/local/bin/yt-dlp # Make executable
RUN git clone https://github.com/mayeaux/generate-subtitles
ENV LIBRETRANSLATE http://127.0.0.1:3000
ENV CONCURRENT_AMOUNT 2
ENV NODE_ENV production
ENV UPLOAD_FILE_SIZE_LIMIT_IN_MB 10000
WORKDIR 'generate-subtitles'
RUN npm install
EXPOSE 3000
CMD npm start
# build with docker build -t freesubtitles .
# run with docker run --rm -p 3000:3000 --name generate-subtitles freesubtitles I changed the It should be doable to use the nvidia GPU to speed things up, but I don't have the closed-source drivers on my computer to try it out. |
any idea how I can make it use the the nvidia cuda driver? I tried to add the nvidia runtime to the docker command but that was not enough, at least I don't see any GPU usage |
You might get more people using this if you packaged it in a nice Dockerfile or docker-compose.yml file to easily have everything installed/packaged.
The text was updated successfully, but these errors were encountered: