Create Dockerfile
Browse files- Dockerfile +30 -0
Dockerfile
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim-buster
|
| 2 |
+
|
| 3 |
+
# Set the working directory in the container to /app
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
|
| 6 |
+
# Install git
|
| 7 |
+
RUN apt-get update && apt-get install -y git
|
| 8 |
+
|
| 9 |
+
# Qui' sotto metti il link del mediaflow-proxy che vuoi utilizzare opuure lascialo cosi se vuoi utilizzare quello originale
|
| 10 |
+
# nel caso hai un tuo MFP diverso sostituisci https://github.com/mhdzumair/mediaflow-proxy con il tuo lasciando invariato quello che viene dopo
|
| 11 |
+
RUN git clone https://github.com/nzo66/mediaflow-proxy.git temp_mediaflow
|
| 12 |
+
# Questo non toccarlo
|
| 13 |
+
RUN git clone https://github.com/nzo66/HF-MFP.git temp_hfmfp
|
| 14 |
+
|
| 15 |
+
# Copy all files from both repositories to the main directory
|
| 16 |
+
RUN cp -r temp_mediaflow/* . 2>/dev/null || true
|
| 17 |
+
RUN cp -r temp_hfmfp/* . 2>/dev/null || true
|
| 18 |
+
|
| 19 |
+
# Remove temporary directories
|
| 20 |
+
RUN rm -rf temp_mediaflow temp_hfmfp
|
| 21 |
+
|
| 22 |
+
# Copy the local config.json file to the container
|
| 23 |
+
|
| 24 |
+
# Install any needed packages specified in requirements.txt
|
| 25 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 26 |
+
|
| 27 |
+
EXPOSE 7860
|
| 28 |
+
|
| 29 |
+
# Run run.py when the container launches
|
| 30 |
+
CMD ["uvicorn", "run:main_app", "--host", "0.0.0.0", "--port", "7860", "--workers", "4"]
|