Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -35
Dockerfile
CHANGED
|
@@ -1,40 +1,10 @@
|
|
| 1 |
-
# Use official Python image
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
-
|
| 5 |
-
WORKDIR /home/user/app
|
| 6 |
|
| 7 |
-
|
| 8 |
-
RUN
|
| 9 |
-
git \
|
| 10 |
-
git-lfs \
|
| 11 |
-
ffmpeg \
|
| 12 |
-
libsm6 \
|
| 13 |
-
libxext6 \
|
| 14 |
-
cmake \
|
| 15 |
-
rsync \
|
| 16 |
-
libgl1-mesa-glx && \
|
| 17 |
-
rm -rf /var/lib/apt/lists/* && \
|
| 18 |
-
git lfs install
|
| 19 |
|
| 20 |
-
|
| 21 |
-
RUN pip install --no-cache-dir pip -U && \
|
| 22 |
-
pip install --no-cache-dir \
|
| 23 |
-
fastapi \
|
| 24 |
-
torch \
|
| 25 |
-
diffusers \
|
| 26 |
-
transformers \
|
| 27 |
-
gradio \
|
| 28 |
-
uvicorn
|
| 29 |
|
| 30 |
-
|
| 31 |
-
RUN rm -rf /root/.cache
|
| 32 |
-
|
| 33 |
-
# Copy application files
|
| 34 |
-
COPY app.py .
|
| 35 |
-
|
| 36 |
-
# Expose port
|
| 37 |
-
EXPOSE 7860
|
| 38 |
-
|
| 39 |
-
# Run the application
|
| 40 |
-
CMD ["python", "app.py"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
| 3 |
+
WORKDIR /app
|
|
|
|
| 4 |
|
| 5 |
+
COPY requirements.txt .
|
| 6 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
COPY . .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|