Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nlueem committed Aug 3, 2024
1 parent 8fa8256 commit 1617581
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# You can adapt the base image based on the CUDA version installed on the device
# adapt cuda version based on your cuda-version, TERMINAL: `nvidia-smi`
FROM nvidia/cuda:11.4.3-cudnn8-runtime-ubuntu20.04

#Set up environment
# Set up environment
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y curl
RUN apt-get install -y git
RUN apt-get install unzip
Expand All @@ -16,14 +16,13 @@ COPY . .

# Create cache directory and set permissions
RUN mkdir -p /restful-llama-3/cache && chmod -R 777 /restful-llama-3/cache
# Make start_app.sh executable
RUN chmod +x /restful-llama-3/start_app.sh

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV HF_HOME=/restful-llama-3/cache
ENV HF_DATASETS_CACHE=/restful-llama-3/cache

# Make start_app.sh executable
RUN chmod +x /restful-llama-3/start_app.sh

EXPOSE 7860
CMD ["./start_app.sh"]
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ A simple RESTful service for the Meta-Llama-3.1-8B-Instruct language model.

## Pre-requisites

1. A CUDA enabled GPU machine, runs optimal with 24GB vRAM
1. A CUDA enabled GPU Space, runs optimal with 24GB vRAM
2. Access to [LLaMa-3.1 weights](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct) from Huggingface
3. Personal Access Token copied to Secret Access Token(space) named HUGGING_FACE_HUB_TOKEN
3. New Public Hugging Face Space <https://huggingface.co/docs/hub/spaces-overview>, Blank Docker Container
4. Personal Access Token (Read) <https://huggingface.co/docs/hub/security-tokens>, save it somewhere safe
5. Secret Access Token in your space. Name: HUGGING_FACE_HUB_TOKEN, Value: Personal Access Token
6. (Optional) Local .env file to store Personal Access Token

## Getting Started

1. Copy/Push this repo via ssh to your huggingface-space, blank docker-container setup
1. Push this repo via SSH to your Hugging Face space

## How to use

Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
accelerate==0.33.0
torch==2.4.0
fastapi==0.112.0
gunicorn==22.0.0
transformers==4.43.3
uvicorn==0.30.5

0 comments on commit 1617581

Please sign in to comment.