Spaces:
Runtime error
Runtime error
| FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-devel as base | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| ENV LANG en_US.UTF-8 | |
| ENV LANGUAGE en_US:UTF-8 | |
| ENV LC_ALL en_US.UTF-8 | |
| RUN apt update -y \ | |
| && apt install curl git vim gcc \g++ make wget locales dnsutils zip unzip cmake nginx -y \ | |
| && apt clean \ | |
| && rm -rf /var/cache/apt/* \ | |
| && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \ | |
| && locale-gen | |
| RUN apt update -y \ | |
| && apt install tree build-essential libsndfile-dev software-properties-common ca-certificates libx11-6 -y \ | |
| && apt clean \ | |
| && rm -rf /var/cache/apt/* | |
| ARG CODE_RELEASE | |
| RUN \ | |
| echo "**** install openvscode-server runtime dependencies ****" && \ | |
| apt-get update && \ | |
| apt-get install -y \ | |
| jq \ | |
| libatomic1 \ | |
| nano \ | |
| net-tools \ | |
| netcat && \ | |
| echo "**** install openvscode-server ****" && \ | |
| if [ -z ${CODE_RELEASE+x} ]; then \ | |
| CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest" \ | |
| | awk '/tag_name/{print $4;exit}' FS='[""]' \ | |
| | sed 's|^openvscode-server-v||'); \ | |
| fi && \ | |
| mkdir -p /app/openvscode-server && \ | |
| curl -o \ | |
| /tmp/openvscode-server.tar.gz -L \ | |
| "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v${CODE_RELEASE}/openvscode-server-v${CODE_RELEASE}-linux-x64.tar.gz" && \ | |
| tar xf \ | |
| /tmp/openvscode-server.tar.gz -C \ | |
| /app/openvscode-server/ --strip-components=1 && \ | |
| echo "**** clean up ****" && \ | |
| apt-get clean && \ | |
| rm -rf \ | |
| /tmp/* \ | |
| /var/lib/apt/lists/* \ | |
| /var/tmp/* | |
| RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \ | |
| apt-get install -y nodejs && \ | |
| npm install -g configurable-http-proxy | |
| # Set up a new user named "user" with user ID 1000 | |
| RUN useradd -m -u 1000 user | |
| # Switch to the "user" user | |
| USER user | |
| # Set home to the user's home directory | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/workspace | |
| EXPOSE 7860 | |
| EXPOSE 5000 | |
| EXPOSE 5002 | |
| CMD exec "/app/openvscode-server/bin/openvscode-server --host 0.0.0.0 --port 7860 --without-connection-token \"${@}\" --" | |