File size: 1,208 Bytes
aae1d71 31a1090 aae1d71 31a1090 aae1d71 6900a38 aae1d71 6fb9724 aae1d71 6fb9724 aae1d71 03966ae aae1d71 d60c0fe 60c9f07 c8eb842 aae1d71 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# # Use a lightweight Python image as the base
# FROM python:3-slim
# # Set the working directory inside the container
# WORKDIR /app
# # Install git and clean up to keep the image small
# RUN apt-get update && \
# apt-get install -y git && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*
# # Copy all files to the container
# COPY . /app
# # Install required dependencies
# RUN pip install --upgrade pip
# RUN pip install -r requirements.txt
# # Copy the shell script and make it executable
# COPY sft.sh /usr/local/bin/sft
# RUN chmod +x /usr/local/bin/sft
# # Launch the application
# EXPOSE 7860
# ENV GRADIO_SERVER_NAME="0.0.0.0"
# CMD ["python", "app.py"]
FROM python:3.10-slim
WORKDIR /usr/src/app
COPY . .
# Install git and clean up to keep the image small
RUN apt-get update && \
apt-get install -y git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install required dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Make sft script executable
COPY sft.sh /usr/local/bin/sft
RUN chmod +x /usr/local/bin/sft
# Start gradio application
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
CMD ["python", "app.py"] |