Spaces:
Running
Running
File size: 896 Bytes
c3e24aa 94b5257 c3e24aa 94b5257 c3e24aa 94b5257 7606057 c3e24aa 94b5257 c3e24aa 94b5257 c3e24aa |
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 |
FROM python:3.10-slim-buster
# Set the working directory inside the container
WORKDIR /app
# Install git
RUN apt-get update && \
apt-get install -y git
# Clone the repository into the current directory
RUN git clone https://github.com/AttnVision/mp.git .
# Modify a specific file directly after clone (before dependencies are installed)
RUN python <<EOF
file_path = "mediaflow_proxy/configs.py"
with open(file_path, "r") as file:
content = file.read()
modified_content = content.replace("disable_home_page: bool = False", "disable_home_page: bool = True")
with open(file_path, "w") as file:
file.write(modified_content)
print(f"File modified: {file_path}")
EOF
# Proceed with pip installs
RUN pip install --no-cache-dir -r requirements.txt
# Expose the port and run the service
EXPOSE 7860
CMD ["uvicorn", "run:main_app", "--host", "0.0.0.0", "--port", "7860", "--workers", "4"] |