File size: 1,493 Bytes
551883c
 
 
d2a1f38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207f826
d2a1f38
 
 
551883c
d2a1f38
4dbb63a
d2a1f38
551883c
 
1b06ace
 
e087d9a
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Use NVIDIA CUDA image
FROM nvidia/cuda:12.9.1-cudnn-devel-ubuntu24.04

# Remove any third-party apt sources to avoid issues with expiring keys.
# Install some basic utilities
RUN rm -f /etc/apt/sources.list.d/*.list && \
    apt-get update && apt-get install -y --no-install-recommends \
    curl \
    ca-certificates \
    sudo \
    git \
    wget \
    procps \
    git-lfs \
    zip \
    unzip \
    htop \
    vim \
    nano \
    bzip2 \
    libx11-6 \
    build-essential \
    libsndfile-dev \
    software-properties-common \
    dumb-init \
 && rm -rf /var/lib/apt/lists/*

RUN add-apt-repository ppa:flexiondotorg/nvtop && \
    apt-get upgrade -y && \
    apt-get install -y --no-install-recommends nvtop

RUN curl -sL https://deb.nodesource.com/setup_21.x  | bash - && \
    apt-get install -y nodejs npm
    
RUN curl http://code-server.dev/install.sh -fsSL | bash

RUN usermod -aG sudo ubuntu

# Set the user as root with the custom name
USER root
# Expose the default port used by Visual Studio Code Server
EXPOSE 7860
# Copy any additional extensions or settings you want to include
# For example, if you have a list of extensions in a file called extensions.txt:
# COPY extensions.txt /home/coder/extensions.txt
# RUN cat /home/coder/extensions.txt | xargs -n 1 code-server --install-extension
# Start Visual Studio Code Server on container startup with password protection
ENTRYPOINT ["dumb-init", "code-server", "--bind-addr", "0.0.0.0:7860", ".", "--auth", "password"]