container start command troubleshooting

hello, i am trying to create a template with the following start commands:
apt-get update && apt-get upgrade -y && \
apt-get install -y git nodejs npm jq nano vim python3-pip python3-dev && \
npm install -g pm2 && \
pip install --upgrade pip && \
git clone https://github.com/namoray/vision && \
cd vision && pip install -e . && pip install -r git_requirements.txt
apt-get update && apt-get upgrade -y && \
apt-get install -y git nodejs npm jq nano vim python3-pip python3-dev && \
npm install -g pm2 && \
pip install --upgrade pip && \
git clone https://github.com/namoray/vision && \
cd vision && pip install -e . && pip install -r git_requirements.txt
however, i get this in my container logs: 2024-02-24T23:31:41.879903535Z E: Command line option 'g' [from -g] is not understood in combination with the other options. and i am unable to start the web terminal to connect
3 Replies
chad warden
chad warden4mo ago
No description
chad warden
chad warden4mo ago
current setup
ashleyk
ashleyk4mo ago
Looks like npm doesn't understand the -g command line argument, the node/npm that comes with Ubuntu is pretty ancient, I recommend installing it manually to ensure you get the latest/correct version rather than installing it from the apt package manager. If you need so much extra stuff, I also recommend rather building a custom docker image based on the pytorch one rather than trying to do so much stuff in the docker start command..