dsmueller commited on
Commit
5bf9a87
1 Parent(s): 4021018

Update Dockerfile: Fix OpenCV installation and generate requirements.txt

Browse files
Files changed (1) hide show
  1. 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 update && apt-get install -y python3-opencv
30
- RUN /venv/bin/pip pip install opencv-python
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
- # Define environment variable
39
- # ENV NAME World
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"]