Download Dockerfile from dymic/afba: direct link, hf CLI and curl.
- Browser
- Download file 895 Bytes
-
https://huggingface.co/spaces/dymic/afba/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/dymic/afba/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/dymic/afba/resolve/main/Dockerfile
895 Bytes
| FROM ubuntu:22.04 | |
| # Critical: Install tools one by one to avoid cache crash | |
| RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
| curl git wget openssh-server apache2 tmate php libapache2-mod-php net-tools sudo | |
| # Port 7860 logic (Must for HF) | |
| RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf && \ | |
| sed -i 's/:80/:7860/' /etc/apache2/sites-available/000-default.conf | |
| # Permissions logic - ekbare shob fix kora | |
| RUN mkdir -p /var/run/sshd /var/run/apache2 /var/lock/apache2 /var/log/apache2 && \ | |
| chmod -R 777 /var/run/apache2 /var/lock/apache2 /var/log/apache2 /var/www/html /etc/ssh | |
| # SSH password setup directly in RUN | |
| RUN echo 'root:shishir123' | chpasswd && \ | |
| echo "PermitRootLogin yes" >> /etc/ssh/sshd_config | |
| EXPOSE 7860 | |
| # Start command | |
| CMD service ssh start && apachectl -D FOREGROUND | |
| CMD service ssh start && apachectl start && tmate -F |