Rename Dockerfile.txt to Dockerfile
Browse files
Dockerfile.txt → Dockerfile
RENAMED
|
@@ -1,6 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
# Start with CUDA base image
|
| 5 |
FROM nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04
|
| 6 |
|
|
@@ -56,8 +53,11 @@ RUN pip3 install --no-cache-dir --user -r requirements.txt
|
|
| 56 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 57 |
COPY --chown=user . $HOME/app
|
| 58 |
|
|
|
|
|
|
|
|
|
|
| 59 |
# Make port 7860 available to the world outside this container
|
| 60 |
EXPOSE 7860
|
| 61 |
|
| 62 |
# Run app.py when the container launches
|
| 63 |
-
CMD ["
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Start with CUDA base image
|
| 2 |
FROM nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04
|
| 3 |
|
|
|
|
| 53 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 54 |
COPY --chown=user . $HOME/app
|
| 55 |
|
| 56 |
+
# Example: Use secret API_KEY for a command
|
| 57 |
+
RUN --mount=type=secret,id=API_KEY,mode=0444,required=true \
|
| 58 |
+
|
| 59 |
# Make port 7860 available to the world outside this container
|
| 60 |
EXPOSE 7860
|
| 61 |
|
| 62 |
# Run app.py when the container launches
|
| 63 |
+
CMD ["bash", "-c", "source ~/.bashrc && python3 -m streamlit run app.py --server.port=7860 --server.address=0.0.0.0 --server.enableXsrfProtection=false"]
|