nyanya commited on
Commit
5629e8a
1 Parent(s): 2cb60a7

feat: npm -g user

Browse files
Files changed (3) hide show
  1. Dockerfile +6 -0
  2. on_startup.sh +0 -3
  3. start_server.sh +1 -3
Dockerfile CHANGED
@@ -73,6 +73,12 @@ RUN curl -s "https://api.github.com/repos/coder/code-server/releases/latest" \
73
  apt-get clean && \
74
  rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
75
 
 
 
 
 
 
 
76
  # Install Node.js and configurable-http-proxy
77
  RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
78
  && apt-get install -y nodejs \
 
73
  apt-get clean && \
74
  rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
75
 
76
+ RUN mkdir /app/.npm-global \
77
+ && npm config set prefix '/app/.npm-global' \
78
+ && echo 'export PATH=/app/.npm-global/bin:$PATH' >> ~/.profile \
79
+ && echo 'export PATH=/app/.npm-global/bin:$PATH' >> ~/.bashrc \
80
+ && chown -R user:user /app/.npm-global
81
+
82
  # Install Node.js and configurable-http-proxy
83
  RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
84
  && apt-get install -y nodejs \
on_startup.sh CHANGED
@@ -3,7 +3,4 @@
3
  # For example, to clone transformers and install it in dev mode:
4
  # git clone https://github.com/huggingface/transformers.git
5
  # cd transformers && pip install -e ".[dev]"
6
- # useradd -m aku && adduser aku sudo && echo 'aku:aku' | sudo chpasswd && sed -i 's/\/bin\/sh/\/bin\/bash/g' /etc/passwd
7
- # /usr/bin/newuidmap 1500 0 1000 1 1 100000 65536
8
- #cd /usr/lib/node_modules/code-server/lib/vscode/ && npm i . --production --force
9
  conda install -c conda-forge gh
 
3
  # For example, to clone transformers and install it in dev mode:
4
  # git clone https://github.com/huggingface/transformers.git
5
  # cd transformers && pip install -e ".[dev]"
 
 
 
6
  conda install -c conda-forge gh
start_server.sh CHANGED
@@ -3,14 +3,12 @@
3
  nginx -t
4
  service nginx start
5
 
6
- ssh -o StrictHostKeyChecking=no -R nya:80:localhost:8080 tunne.link -p3332 &
7
 
8
  echo "Starting VSCode Server..."
9
  /app/openvscode-server/bin/openvscode-server --host 0.0.0.0 --port 7860 --without-connection-token "${@}" &
10
 
11
- #/home/user/one-api/one-api --port 3000 --log-dir ./logs &
12
 
13
- #/usr/bin/code-server --bind-addr 0.0.0.0:8080 --auth none --proxy-domain cripp.link &
14
  /app/code-server/bin/code-server --bind-addr 0.0.0.0:8080 --auth none --proxy-domain cripp.link &
15
 
16
  #echo "Starting Code Tunnel..."
 
3
  nginx -t
4
  service nginx start
5
 
6
+ ssh -o StrictHostKeyChecking=no -R nya:80:localhost:8080 tunne.link -p8043 &
7
 
8
  echo "Starting VSCode Server..."
9
  /app/openvscode-server/bin/openvscode-server --host 0.0.0.0 --port 7860 --without-connection-token "${@}" &
10
 
 
11
 
 
12
  /app/code-server/bin/code-server --bind-addr 0.0.0.0:8080 --auth none --proxy-domain cripp.link &
13
 
14
  #echo "Starting Code Tunnel..."