Spaces:
Runtime error
Runtime error
Update Dockerfile: Fix OpenCV installation and generate requirements.txt
Browse files- Dockerfile +5 -6
Dockerfile
CHANGED
@@ -26,8 +26,8 @@ RUN python -m venv /venv && \
|
|
26 |
/venv/bin/pip install --no-cache-dir -r requirements.txt
|
27 |
|
28 |
# Fix broken OpenCV installation for docker container
|
29 |
-
RUN apt-get
|
30 |
-
RUN /venv/bin/pip
|
31 |
|
32 |
# Set user back to non-root
|
33 |
USER user
|
@@ -35,9 +35,8 @@ USER user
|
|
35 |
# Make port 80 available to the world outside this container
|
36 |
EXPOSE 80
|
37 |
|
38 |
-
#
|
39 |
-
|
40 |
|
41 |
# Run train_llm.py when the container launches
|
42 |
-
CMD ["/bin/bash", "-c", "source /venv/bin/activate && python train_llm.py"]
|
43 |
-
# CMD ["/venv/bin/python", "train_llm.py"]
|
|
|
26 |
/venv/bin/pip install --no-cache-dir -r requirements.txt
|
27 |
|
28 |
# Fix broken OpenCV installation for docker container
|
29 |
+
RUN apt-get install -y python3-opencv
|
30 |
+
# RUN /venv/bin/pip install opencv-python
|
31 |
|
32 |
# Set user back to non-root
|
33 |
USER user
|
|
|
35 |
# Make port 80 available to the world outside this container
|
36 |
EXPOSE 80
|
37 |
|
38 |
+
# Generate requirements.txt using pip freeze
|
39 |
+
RUN /venv/bin/pip freeze > requirements.txt
|
40 |
|
41 |
# Run train_llm.py when the container launches
|
42 |
+
CMD ["/bin/bash", "-c", "source /venv/bin/activate && python train_llm.py"]
|
|