Spaces:
Running
Running
Download Dockerfile from buddhaword/web: direct link, hf CLI and curl.
- Browser
- Download file 1.84 kB
-
https://huggingface.co/spaces/buddhaword/web/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/buddhaword/web/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/buddhaword/web/resolve/main/Dockerfile
1.84 kB
| FROM php:8.3-apache | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git unzip curl libpng-dev libjpeg-dev libfreetype6-dev libonig-dev libzip-dev libcurl4-openssl-dev libicu-dev poppler-utils \ | |
| python3 python3-pip \ | |
| && docker-php-ext-configure gd --with-freetype --with-jpeg \ | |
| && docker-php-ext-install -j$(nproc) \ | |
| pdo_mysql mbstring curl gd intl zip exif sockets \ | |
| && pip install --break-system-packages -U "huggingface_hub[cli]" edge-tts \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN a2enmod rewrite | |
| RUN echo 'memory_limit = 256M' > /usr/local/etc/php/conf.d/memory.ini | |
| RUN echo '<VirtualHost *:7860>' > /etc/apache2/sites-available/000-default.conf \ | |
| && echo ' DocumentRoot /var/www/html/public' >> /etc/apache2/sites-available/000-default.conf \ | |
| && echo ' <Directory /var/www/html/public>' >> /etc/apache2/sites-available/000-default.conf \ | |
| && echo ' Options -Indexes +FollowSymLinks' >> /etc/apache2/sites-available/000-default.conf \ | |
| && echo ' AllowOverride All' >> /etc/apache2/sites-available/000-default.conf \ | |
| && echo ' Require all granted' >> /etc/apache2/sites-available/000-default.conf \ | |
| && echo ' </Directory>' >> /etc/apache2/sites-available/000-default.conf \ | |
| && echo '</VirtualHost>' >> /etc/apache2/sites-available/000-default.conf | |
| RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf | |
| RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
| WORKDIR /var/www/html | |
| COPY composer.json composer.lock ./ | |
| RUN composer install --no-dev --optimize-autoloader --no-interaction | |
| COPY . . | |
| RUN mkdir -p storage/cache/sqlite storage/tmp storage/tts && chmod -R 777 storage | |
| COPY entrypoint.sh /entrypoint.sh | |
| RUN chmod +x /entrypoint.sh | |
| EXPOSE 7860 | |
| ENTRYPOINT ["/entrypoint.sh"] | |