book_1 / Dockerfile
yongyeol's picture
Update Dockerfile
ee1181f verified
FROM ubuntu:20.04
FROM tensorflow/tensorflow:2.15.0
# Set environment variables to avoid interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:openjdk-r/ppa && \
apt-get update && \
apt-get install -y openjdk-11-jdk curl && \
rm -rf /var/lib/apt/lists/*
# Set JAVA_HOME environment variable
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
ENV PATH $JAVA_HOME/bin:$PATH
# Install Python
RUN apt-get update && \
apt-get install -y python3 python3-pip && \
rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Copy the requirements file and install Python dependencies
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy the application code
COPY app.py .
# Expose the port Gradio will run on
EXPOSE 7860
# Command to run the application
CMD ["python3", "app.py"]