codematic / Dockerfile
ThongCoder's picture
Update Dockerfile
eabd5e4 verified
raw
history blame
1.67 kB
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Core tools
RUN apt-get update && apt-get install -y \
curl wget git unzip sudo nano bash \
software-properties-common ca-certificates gnupg \
build-essential g++ \
&& rm -rf /var/lib/apt/lists/*
# Add deadsnakes PPA for Python 3.12
RUN add-apt-repository ppa:deadsnakes/ppa -y && apt-get update
# Install Python 3.12 and pip
RUN apt-get install -y python3.12 python3.12-venv python3.12-dev \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
# Make python3 point to python3.12
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 \
&& update-alternatives --install /usr/bin/pip pip /usr/local/bin/pip3.12 1
# Install Node.js + npm (from NodeSource)
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs
# Install Java (OpenJDK 17)
RUN apt-get install -y openjdk-17-jdk
# Install .NET SDK (C#)
RUN wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get update && apt-get install -y dotnet-sdk-8.0
# Install code-server
RUN curl -fsSL https://code-server.dev/install.sh | sh
# Copy entrypoint + backup/restore
COPY entrypoint.sh /entrypoint.sh
COPY backup.py /backup.py
COPY restore.py /restore.py
RUN chmod +x /entrypoint.sh
WORKDIR /home/vscode
RUN mkdir -p /home/workspace
RUN chmod -R 777 /home
# Create user
RUN useradd -ms /bin/bash vscode
USER vscode
RUN pip install huggingface_hub[cli]
EXPOSE 7860
ENTRYPOINT ["/entrypoint.sh"]