Download Dockerfile from proti0070/ubuntu: direct link, hf CLI and curl.
- Browser
- Download file 899 Bytes
-
https://huggingface.co/spaces/proti0070/ubuntu/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/proti0070/ubuntu/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/proti0070/ubuntu/resolve/main/Dockerfile
899 Bytes
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get update && apt-get install -y \ | |
| python3 \ | |
| python3-pip \ | |
| sudo \ | |
| wget \ | |
| curl \ | |
| git \ | |
| vim \ | |
| nano \ | |
| htop \ | |
| net-tools \ | |
| iputils-ping \ | |
| build-essential \ | |
| openssh-server \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN mkdir /var/run/sshd && \ | |
| echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && \ | |
| echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config | |
| RUN useradd -m -u 1000 -s /bin/bash ubuntu && \ | |
| echo "ubuntu:huggingface" | chpasswd && \ | |
| usermod -aG sudo ubuntu && \ | |
| echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/ubuntu | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip3 install --no-cache-dir -r requirements.txt | |
| COPY app.py . | |
| RUN chown -R ubuntu:ubuntu /app | |
| EXPOSE 7860 | |
| EXPOSE 22 | |
| USER ubuntu | |
| CMD ["bash", "-c", "sudo /usr/sbin/sshd && python3 app.py"] |