Update Dockerfile
Browse files- Dockerfile +16 -7
Dockerfile
CHANGED
|
@@ -1,22 +1,31 @@
|
|
| 1 |
-
#
|
| 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 |
-
|
|
|
|
| 9 |
RUN mkdir -p /home/app/staticfiles/app/uploaded_videos/
|
| 10 |
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
COPY ./requirements.txt /app/requirements.txt
|
| 12 |
-
# RUN
|
| 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"]
|