navpan2 commited on
Commit
dd4c9f9
·
verified ·
1 Parent(s): 19153ca

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -7
Dockerfile CHANGED
@@ -1,22 +1,31 @@
1
- #pull the nvidia cuda GPU docker image
2
- # FROM nvidia/cuda
3
-
4
- #pull python 3.6.8 docker image
5
  FROM python:3.6.8
 
6
  ENV PYTHONDONTWRITEBYTECODE 1
7
  ENV PYTHONUNBUFFERED 1
8
- #create a directory to serve static files
 
9
  RUN mkdir -p /home/app/staticfiles/app/uploaded_videos/
10
  WORKDIR /app
 
 
 
 
 
 
11
  COPY ./requirements.txt /app/requirements.txt
12
- # RUN python -m pip install --upgrade pip
13
  RUN pip install cmake
14
  RUN pip install opencv-python==4.2.0.32
15
  RUN pip install -r requirements.txt
 
 
16
  COPY . /app
17
  RUN python manage.py collectstatic --noinput
18
  RUN pip install gunicorn
 
 
19
  RUN mkdir -p /app/uploaded_videos /app/uploaded_videos/
20
 
21
  VOLUME /app/run/
22
- ENTRYPOINT ["/app/bin/gunicorn_start.sh"]
 
1
+ # Pull python 3.6.8 docker image
 
 
 
2
  FROM python:3.6.8
3
+
4
  ENV PYTHONDONTWRITEBYTECODE 1
5
  ENV PYTHONUNBUFFERED 1
6
+
7
+ # Create necessary directories
8
  RUN mkdir -p /home/app/staticfiles/app/uploaded_videos/
9
  WORKDIR /app
10
+
11
+ # Install Rust and Cargo
12
+ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
13
+ ENV PATH="/root/.cargo/bin:$PATH"
14
+
15
+ # Copy requirements and install dependencies
16
  COPY ./requirements.txt /app/requirements.txt
17
+ # RUN pip install --upgrade pip
18
  RUN pip install cmake
19
  RUN pip install opencv-python==4.2.0.32
20
  RUN pip install -r requirements.txt
21
+
22
+ # Copy application files
23
  COPY . /app
24
  RUN python manage.py collectstatic --noinput
25
  RUN pip install gunicorn
26
+
27
+ # Create uploaded videos directory
28
  RUN mkdir -p /app/uploaded_videos /app/uploaded_videos/
29
 
30
  VOLUME /app/run/
31
+ ENTRYPOINT ["/app/bin/gunicorn_start.sh"]