Create Dockerfile
Browse files- Dockerfile +36 -0
Dockerfile
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official Python runtime as a parent image
|
| 2 |
+
FROM python:3.10
|
| 3 |
+
|
| 4 |
+
# Set the working directory to /home/user/app
|
| 5 |
+
WORKDIR /home/user/app
|
| 6 |
+
|
| 7 |
+
# Install system dependencies
|
| 8 |
+
RUN apt-get update && apt-get install -y \
|
| 9 |
+
git \
|
| 10 |
+
git-lfs \
|
| 11 |
+
ffmpeg \
|
| 12 |
+
libsm6 \
|
| 13 |
+
libxext6 \
|
| 14 |
+
cmake \
|
| 15 |
+
rsync \
|
| 16 |
+
libgl1-mesa-glx \
|
| 17 |
+
curl \
|
| 18 |
+
nodejs \
|
| 19 |
+
sqlite3 \
|
| 20 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
+
|
| 22 |
+
# Copy the current directory contents into the container at /home/user/app
|
| 23 |
+
COPY --chown=1000:1000 . /home/user/app
|
| 24 |
+
|
| 25 |
+
# Install Python dependencies
|
| 26 |
+
RUN pip install --no-cache-dir pip -U && \
|
| 27 |
+
pip install --no-cache-dir -r requirements.txt
|
| 28 |
+
|
| 29 |
+
# Make port 7860 available to the world outside this container
|
| 30 |
+
EXPOSE 7860
|
| 31 |
+
|
| 32 |
+
# Define environment variable
|
| 33 |
+
ENV NAME World
|
| 34 |
+
|
| 35 |
+
# Run app.py when the container launches
|
| 36 |
+
CMD ["python", "app.py"]
|