Update Dockerfile
Browse files- Dockerfile +9 -3
Dockerfile
CHANGED
@@ -4,9 +4,9 @@ FROM python:3.9
|
|
4 |
# Install CUDA for GPU support (optional, based on your needs)
|
5 |
# Uncomment the following lines if you need GPU support
|
6 |
# RUN apt-get update && apt-get install -y --no-install-recommends \
|
7 |
-
|
8 |
# && \
|
9 |
-
|
10 |
|
11 |
# Set the working directory in the container
|
12 |
WORKDIR /app
|
@@ -23,5 +23,11 @@ EXPOSE 7860
|
|
23 |
# Define environment variable for Gradio server port
|
24 |
ENV GRADIO_SERVER_PORT=7860
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
# Run app.py when the container launches
|
27 |
-
CMD ["
|
|
|
4 |
# Install CUDA for GPU support (optional, based on your needs)
|
5 |
# Uncomment the following lines if you need GPU support
|
6 |
# RUN apt-get update && apt-get install -y --no-install-recommends \
|
7 |
+
# cuda-cudart-dev-11.0 \
|
8 |
# && \
|
9 |
+
# rm -rf /var/lib/apt/lists/*
|
10 |
|
11 |
# Set the working directory in the container
|
12 |
WORKDIR /app
|
|
|
23 |
# Define environment variable for Gradio server port
|
24 |
ENV GRADIO_SERVER_PORT=7860
|
25 |
|
26 |
+
# Set the TRANSFORMERS_CACHE environment variable
|
27 |
+
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/hub
|
28 |
+
|
29 |
+
# Create the cache directory if it doesn't exist
|
30 |
+
RUN mkdir -p $TRANSFORMERS_CACHE
|
31 |
+
|
32 |
# Run app.py when the container launches
|
33 |
+
CMD ["python", "app.py"]
|