metaambod / Dockerfile
unijoh's picture
Update Dockerfile
da895a2 verified
raw
history blame
975 Bytes
FROM python:3.10
# Install system dependencies and Rust
RUN apt-get update && apt-get install -y \
git \
git-lfs \
ffmpeg \
libsm6 \
libxext6 \
cmake \
rsync \
libgl1-mesa-glx \
curl \
build-essential \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
# Set environment variables for Rust
ENV PATH="/root/.cargo/bin:${PATH}"
# Set working directory
WORKDIR /home/user/app
# Upgrade pip
RUN pip install --no-cache-dir --upgrade pip
# Copy the requirements file
COPY requirements.txt /tmp/requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir -r /tmp/requirements.txt
# Copy the rest of the application code
COPY . .
# Set the environment variable for Gradio
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT=7860
# Expose the Gradio server port
EXPOSE 7860
# Run the application
CMD ["python", "app.py"]